Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 20 Apr 2013
Offline Last Active Jul 11 2013 05:52 PM

Topics I've Started

SDL_net TCP packets getting truncated

20 April 2013 - 11:28 PM

Hi everyone! I've been creating a game that utilizes SDL_net to send and receive TCP messages from different clients, but I've recently run into a problem. When a user drags the window (created with SDL), the program pauses because of Windows. However, I've noticed that all of the packets that have been sent to that client become truncated while the window is being dragged because the game is being paused. For example, if I sent a packet containing "Hello world" the client would receive "llo world" after they stop dragging the window. 

I currently send data by using SDLNet_TCP_Send(socket, packetBuffer, messageLength) and receive them by using SDLNet_TCP_Recv(socket, packetBuffer, bufferSize)
Does anyone know if there is a solution to this problem or if there are any good workarounds?