利用socket实现通信

时间:2013-07-08 03:49:38
【文件属性】:
文件名称:利用socket实现通信
文件大小:18KB
文件格式:RAR
更新时间:2013-07-08 03:49:38
socket #include #include #pragma comment (lib, "ws2_32.lib ") BOOL InitWinsock(); void main() { SOCKET socket1; InitWinsock(); struct sockaddr_in local; struct sockaddr_in from; int fromlen =sizeof(from); local.sin_family=AF_INET; local.sin_port=htons(1000); ///监听端口 local.sin_addr.s_addr=INADDR_ANY; ///本机
【文件预览】:
VCsocket
----server()
--------server.c(937B)
--------microsoft.opt(53KB)
--------microsoft.dsw(541B)
--------Debug()
--------microsoft.ncb(57KB)
--------microsoft.plg(897B)
--------microsoft.dsp(4KB)
----client()
--------client.dsp(4KB)
--------client.dsw(535B)
--------client.opt(53KB)
--------Debug()
--------client.plg(885B)
--------client.ncb(41KB)
新建 Microsoft Word 文档.doc

网友评论