mirror of
https://github.com/logos-messaging/nim-sds.git
synced 2026-01-08 00:53:13 +00:00
adding WrapOutgoingMessage
This commit is contained in:
parent
112008c906
commit
6320667dfd
@ -1,4 +1,4 @@
|
|||||||
import std/[options, json, strutils, net]
|
import std/[options, json, strutils, net, sequtils]
|
||||||
import chronos, chronicles, results, confutils, confutils/std/net
|
import chronos, chronicles, results, confutils, confutils/std/net
|
||||||
|
|
||||||
import ../../../alloc
|
import ../../../alloc
|
||||||
@ -40,8 +40,13 @@ proc process*(
|
|||||||
|
|
||||||
case self.operation
|
case self.operation
|
||||||
of WRAP_MESSAGE:
|
of WRAP_MESSAGE:
|
||||||
let byteSeq = self.message.toSeq()
|
let messageBytes = self.message.toSeq()
|
||||||
echo "------------ byteSeq: ", byteSeq
|
|
||||||
echo "------- received wrap message request"
|
let wrappedMessage = wrapOutgoingMessage(rm[], messageBytes, $self.messageId).valueOr:
|
||||||
|
error "WRAP_MESSAGE failed", error = error
|
||||||
|
return err("error processing WRAP_MESSAGE request: " & $error)
|
||||||
|
|
||||||
|
# returns a comma-separates string of bytes
|
||||||
|
return ok(wrappedMessage.mapIt($it).join(","))
|
||||||
|
|
||||||
return ok("")
|
return ok("")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user