|
|
@ -733,16 +733,15 @@ namespace client |
|
|
|
{ |
|
|
|
{ |
|
|
|
// udp forward enabled
|
|
|
|
// udp forward enabled
|
|
|
|
size_t bsz = base64.size(); |
|
|
|
size_t bsz = base64.size(); |
|
|
|
size_t sz = 4 + bsz + 1 + len; |
|
|
|
size_t sz = bsz + 1 + len; |
|
|
|
// build datagram body
|
|
|
|
// build datagram body
|
|
|
|
uint8_t * data = new uint8_t[sz]; |
|
|
|
uint8_t * data = new uint8_t[sz]; |
|
|
|
data[0] = '3'; |
|
|
|
// Destination
|
|
|
|
data[1] = '.'; |
|
|
|
memcpy(data, base64.c_str(), bsz); |
|
|
|
data[2] = '0'; |
|
|
|
// linefeed
|
|
|
|
data[3] = ' '; |
|
|
|
data[bsz] = '\n'; |
|
|
|
memcpy(data+4, base64.c_str(), bsz); |
|
|
|
// Payload
|
|
|
|
data[4+bsz] = '\n'; |
|
|
|
memcpy(data+bsz+1, buf, len); |
|
|
|
memcpy(data+4+bsz+1, buf, len); |
|
|
|
|
|
|
|
// send to remote endpoint
|
|
|
|
// send to remote endpoint
|
|
|
|
m_Owner.SendTo(data, sz, ep); |
|
|
|
m_Owner.SendTo(data, sz, ep); |
|
|
|
delete [] buf; |
|
|
|
delete [] buf; |
|
|
|