mirror of
https://github.com/logos-messaging/nim-chat-poc.git
synced 2026-01-07 16:43:06 +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())
|
cfg_raya.staticPeers.add(cfg_saro.getMultiAddr())
|
||||||
|
|
||||||
# Start Clients
|
# 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.} =
|
saro.onNewMessage(proc(convo: Conversation, msg: ContentFrame) {.async.} =
|
||||||
echo " Saro <------ :: " & getContent(msg)
|
echo " Saro <------ :: " & getContent(msg)
|
||||||
await sleepAsync(10000)
|
await sleepAsync(10000)
|
||||||
@ -76,7 +76,7 @@ proc main() {.async.} =
|
|||||||
|
|
||||||
await saro.start()
|
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.} =
|
raya.onNewMessage(proc(convo: Conversation, msg: ContentFrame) {.async.} =
|
||||||
echo " ------> Raya :: " & getContent(msg)
|
echo " ------> Raya :: " & getContent(msg)
|
||||||
await sleepAsync(10000)
|
await sleepAsync(10000)
|
||||||
|
|||||||
@ -63,7 +63,7 @@ type Client* = ref object
|
|||||||
# Constructors
|
# Constructors
|
||||||
#################################################
|
#################################################
|
||||||
|
|
||||||
proc newClient*(name: string, cfg: WakuConfig, ident: Identity): Client {.raises: [IOError,
|
proc newClient*(cfg: WakuConfig, ident: Identity): Client {.raises: [IOError,
|
||||||
ValueError, SerializationError].} =
|
ValueError, SerializationError].} =
|
||||||
## Creates new instance of a `Client` with a given `WakuConfig`
|
## Creates new instance of a `Client` with a given `WakuConfig`
|
||||||
try:
|
try:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user