I'm working on a server-client application based on UDP protocols. The server is written in c++ and the client is in C#.
On the server side I get the buffer using the recvfrom():
int bufLen = recvfrom(s, buf, 1024, NULL, (sockaddr*)&addr, &addrlen);
The weird thing is that the received buf is exactly what I've sent from the client but the bufLen is -1 which is SOCKET_ERROR.
I have no idea what the problem might be. please help. Thanks a million.