What does Sink::Put return?

9 views
Skip to first unread message

Michael Richards

unread,
May 9, 2012, 7:12:09 AM5/9/12
to cryptop...@googlegroups.com
I'm looking at the docs:
size_t Put (const byte *inString, size_t length, bool blocking=true)
input multiple bytes

It would appear to me that this should return the number of bytes
written but it always seems to return 0.
word32 val=123456;
Sink *sink=new FileSink("test.bin");

cout << "Put returned: " << sink->Put((const byte *)&val,sizeof(val)) << endl;
cout << "PutWord32 returned: " << sink->PutWord32(val) << endl;
delete sink;

How can I tell how many bytes were written?
Reply all
Reply to author
Forward
0 new messages