Skip to content

Instantly share code, notes, and snippets.

@castaneai
Created May 1, 2014 06:50
Show Gist options
  • Save castaneai/a6969bf1ef055c699541 to your computer and use it in GitHub Desktop.
Save castaneai/a6969bf1ef055c699541 to your computer and use it in GitHub Desktop.
[socket]指定バイト受信するまでブロックする関数
void reveive_completely(SOCKET sock, const int length, char* output) {
int received = 0;
while (received < length) recv(sock, output + received, length - received, 0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment