WinSocket
风过以后
无
展开
-
局域网聊天(UDP)
#include "windows.h"#include "winsock.h"#include "iostream"using namespace std;#pragma comment(lib, "ws2_32.lib")DWORD WINAPI Recv(LPVOID lParam){ SOCKET * sock = (SOCKET *)lParam; ch原创 2011-06-24 10:06:00 · 657 阅读 · 0 评论 -
TCP 多线程服务端
#include #include struct THREADDATA{ SOCKET * sock; SOCKADDR_IN * addr;};DWORD WINAPI ConnProc(LPVOID lpParameter){ THREADDATA temp; temp.addr = ((THREADDATA *)lpParameter)->ad原创 2011-06-24 17:35:00 · 603 阅读 · 0 评论 -
局域网获取服务端IP
(1)客户端代码 #include "iostream" #include "winsock2.h" using namespace std; #pragma comment(lib, "ws2_32.lib") #define GETIP 0x101 #define原创 2011-07-21 20:19:22 · 1463 阅读 · 0 评论