diff options
Diffstat (limited to 'examples/simple/simple_pb.nim')
| -rw-r--r-- | examples/simple/simple_pb.nim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/simple/simple_pb.nim b/examples/simple/simple_pb.nim index 56d4afb..a594803 100644 --- a/examples/simple/simple_pb.nim +++ b/examples/simple/simple_pb.nim @@ -18,6 +18,7 @@ type proc newTest1*(): Test1 proc newTest1*(data: string): Test1 +proc newTest1*(data: seq[byte]): Test1 proc writeTest1*(stream: Stream, message: Test1) proc readTest1*(stream: Stream): Test1 proc sizeOfTest1*(message: Test1): uint64 @@ -114,4 +115,9 @@ proc newTest1*(data: string): Test1 = ss = newStringStream(data) result = readTest1(ss) +proc newTest1*(data: seq[byte]): Test1 = + let + ss = newStringStream(cast[string](data)) + result = readTest1(ss) + |
