Created
March 26, 2020 13:22
-
-
Save augustgl/73cb80816fcb7557289e6420814fb932 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int sockprintf(int sock, const char* words, ...) { | |
static char textBuffer[1024]; | |
va_list args; | |
va_start(args, words); | |
vsprintf(textBuffer, words, args); | |
va_end(args); | |
return send(sock, textBuffer, strlen(textBuffer), NULL); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment