tags:

views:

188

answers:

1

I'm using the SDL_net sockets API to create a server and client. I can easily read a string buffer, but when I try to send hexadecimal data, recv gets the length, but I cannot seem to be a able to read the buffer contents.

IPaddress ip;
TCPsocket server,client;
int bufSize = 1024;
char message[bufSize];
int len;

server = SDLNet_TCP_Open(&ip);
client = SDLNet_TCP_Accept(server);
len = SDLNet_TCP_Recv(client,message,bufSize);

Here's a snippet. the buffer length "len" is set (i.e. message length) but I can't get to the data contents in the message buffer. Some sample bind_transmitter PDU data was sent by a random client to the server at that port. I can't read the PDU (SMPP).

A: 
Nikolai N Fetissov