-/*
-int main( int argc, char* argv[] ) {
- OpensslBIOWrapper *bio = new OpensslBIOWrapper(BIO_new_fd(0, 0));
- std::string data = "halloPayload";
- RecordHeader head;
- head.command = 0x7;
- head.flags = 1;
- head.sessid = 13;
- head.command_count = 0xA0B;
- head.totalLength = 9;
- sendCommand( head, data, std::shared_ptr<OpensslBIO>(bio) );
- head.command = 0x8;
-
- try {
- std::string c = parseCommand( head, ":0700010D0000000B0A0900000000000C0068616C6C6F5061796C6F6164E6\n" );
-
- std::cout << "res: " << std::endl;
- std::cout << head.payloadLength << std::endl;
- std::cout << c << std::endl;
- } catch( char const* c ) {
- std::cout << "err: " << c << std::endl;
- }
+ while( true ) {
+ pos += head.payloadLength;
+ target = std::copy( payload.begin(), payload.end(), target );