Bulk send TCP data to the client with the emulated USB Gecko.

Fixes issue 6006.
This commit is contained in:
skidau 2013-02-17 15:27:15 +11:00
parent 1792a9d27b
commit 123035a192
1 changed files with 8 additions and 2 deletions

View File

@ -134,10 +134,16 @@ void GeckoSockServer::ClientThread()
if (send_fifo.size())
{
if (client.Send((char*)&send_fifo.front(), sizeof(u8))
char* packet = new char[send_fifo.size()];
int i = 0;
while(send_fifo.size())
{
packet[i++] = send_fifo.front();
send_fifo.pop();
}
if (client.Send(packet, sizeof(u8)*i)
== sf::Socket::Disconnected)
client_running = false;
send_fifo.pop();
}
} // unlock transfer