摘要: //VC 6.0 SOCKET相关代码已启动//客户端主要代码如下:SOCKADDR_IN addr;int broad = 1;SOCKET fd = socket(AF_INET,SOCK_DGRAM,0);setsockopt(fd,SOL_SOCKET,SO_BROADCAST,(const char *)&broad,sizeof(broad));addr.sin_addr.Sun.S_addr = INADDR_BROADCAST;addr.sin_family = AF_INET;addr.sin_port = htons(1234);sendto(fd,recved,s 阅读全文
posted @ 2012-12-25 17:26 jefffyang 阅读(3438) 评论(0) 推荐(0) 编辑