摘要:
server:#include"WinSock2.h"#include "time.h"#include "stdio.h"#include <string>#include <iostream>#pragma comment(lib,"WS2_32")using namespace std;const int MaxLine = 1024;char lBuf[MaxLine];short gPort = 9877;int main(){ int lRet = 0; WSADATA lWsa 阅读全文
posted @ 2012-10-03 23:56
hailong
阅读(203)
评论(0)
推荐(0)
摘要:
server:#include"WinSock2.h"#include "time.h"#include "stdio.h"#include <string>#include <iostream>#pragma comment(lib,"WS2_32")using namespace std;const int MaxLine = 1024;char lBuf[MaxLine];short gPort = 9877;int main(){ int lRet = 0; WSADATA lWsa 阅读全文
posted @ 2012-10-03 22:44
hailong
阅读(197)
评论(0)
推荐(0)
摘要:
netstat -a 查看服务器监听套接口的状态;信号就是通知某个进程发生了某事件,也称为软件中断。常常是异步发生。 阅读全文
posted @ 2012-10-03 22:24
hailong
阅读(128)
评论(0)
推荐(0)
摘要:
打开process explorer选中想要查看句柄或者加载的dll的进程菜单点击view——Lower Pane View,其下有DLLS和Handles,选中即可。同时,需要勾选Show Lower Pane才能显示出来 阅读全文
posted @ 2012-10-03 17:17
hailong
阅读(1306)
评论(0)
推荐(0)
摘要:
看到网上有一个示例,我查了先关函数,做了一些注释,自己学习下:#include <iostream>#include <string>#include <WinSock2.h>using namespace std;#pragma comment(lib, "WS2_32")int main() { WSAData wsaData; WSAStartup(MAKEWORD(2, 2), &wsaData); SOCKET sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); START 阅读全文
posted @ 2012-10-03 17:07
hailong
阅读(3053)
评论(0)
推荐(0)
摘要:
sever显示client的IP地址和端口:#include"WinSock2.h"#include "time.h"#include "stdio.h"#include <iostream>#pragma comment(lib,"WS2_32")using namespace std;const int MaxLine = 1024;int main(){ int lRet = 0; WSADATA lWsaData; if ((lRet = WSAStartup(MAKEWORD(2,2), &a 阅读全文
posted @ 2012-10-03 12:43
hailong
阅读(435)
评论(0)
推荐(0)

浙公网安备 33010602011771号