mirror of
https://github.com/logos-messaging/nim-chat-poc.git
synced 2026-01-02 14:13:10 +00:00
remove client:name
This commit is contained in:
parent
d1189ea305
commit
2d8de55d43
@ -62,7 +62,7 @@ proc main() {.async.} =
|
||||
cfg_raya.staticPeers.add(cfg_saro.getMultiAddr())
|
||||
|
||||
# Start Clients
|
||||
var saro = newClient("Saro", cfg_saro, createIdentity("Saro"))
|
||||
var saro = newClient(cfg_saro, createIdentity("Saro"))
|
||||
saro.onNewMessage(proc(convo: Conversation, msg: ContentFrame) {.async.} =
|
||||
echo " Saro <------ :: " & getContent(msg)
|
||||
await sleepAsync(10000)
|
||||
@ -76,7 +76,7 @@ proc main() {.async.} =
|
||||
|
||||
await saro.start()
|
||||
|
||||
var raya = newClient("Raya", cfg_raya, createIdentity("Raya"))
|
||||
var raya = newClient(cfg_raya, createIdentity("Raya"))
|
||||
raya.onNewMessage(proc(convo: Conversation, msg: ContentFrame) {.async.} =
|
||||
echo " ------> Raya :: " & getContent(msg)
|
||||
await sleepAsync(10000)
|
||||
|
||||
@ -63,7 +63,7 @@ type Client* = ref object
|
||||
# Constructors
|
||||
#################################################
|
||||
|
||||
proc newClient*(name: string, cfg: WakuConfig, ident: Identity): Client {.raises: [IOError,
|
||||
proc newClient*(cfg: WakuConfig, ident: Identity): Client {.raises: [IOError,
|
||||
ValueError, SerializationError].} =
|
||||
## Creates new instance of a `Client` with a given `WakuConfig`
|
||||
try:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user