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
#include <stdio.h> | |
#define _WINSOCK_DEPRECATED_NO_WARNINGS | |
#include <winsock2.h> | |
#pragma warning(disable:4996) | |
#pragma comment(lib, "ws2_32") | |
#define WM_SOCKET WM_USER + 1 | |
BOOL CALLBACK WinProc(HWND, UINT, WPARAM, LPARAM); |
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
#include <iostream> | |
#include <WS2tcpip.h> | |
#include <winSock2.h> | |
#include <string> | |
#pragma comment(lib, "ws2_32") | |
#pragma warning(disable:4996) |
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
#include <iostream> | |
#include <WS2tcpip.h> | |
#include <winSock2.h> | |
#pragma comment(lib, "ws2_32") | |
#pragma warning(disable:4996) |
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
#include <iostream> | |
#include <WinSock2.h> | |
#pragma comment(lib, "ws2_32") | |
char* ids[64]; | |
int numClients = 0; | |
SOCKET clients[64]; | |
CRITICAL_SECTION cs; |
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
#include <iostream> | |
#include <windows.h> | |
#include <list> | |
#include <iterator> | |
using namespace std; | |
CRITICAL_SECTION cs; | |
static long num_steps = 100000; |
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
#include <iostream> | |
#include <WinSock2.h> | |
#include <WS2tcpip.h> | |
#pragma comment(lib, "ws2_32") // chi thị pragma để gắn hư viện | |
#define _WINSOCK_DEPRECATED_NO_WARNINGS | |
#include<string.h> | |
int main() { |