Skip to content

Instantly share code, notes, and snippets.

@clausjoergensen
Created January 10, 2012 10:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clausjoergensen/1588303 to your computer and use it in GitHub Desktop.
Save clausjoergensen/1588303 to your computer and use it in GitHub Desktop.
int offset = 0;
var socket = tcpClient.Client;
while (offset != data.Length)
{
if (socket.Poll(30, SelectMode.SelectWrite))
{
offset += tcpClient.Client.Send(data, offset, data.Length - offset, SocketFlags.None);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment