一.传输层socket(四层socket,普通socket) 可参考本人以下博客: Windows Socket编程之UDP实现大文件的传输:http://blog.csdn.net/luchengtao11/article/details/71016222 Windows Socket编程之TCP实现大文件的传输:http://blog.csdn.net/luchengtao11/article/details/71012580 (1)创建 socket(AF_INET, SOCK_S
what is websockets Two-way communication over ont TCP socket, a type of PUSH technology HTML5的新特性,用于双向推送消息(例如网页聊天,手机推送消息等) 原理: client利用regular http请求webpage 请求的webpage 执行javascript脚本,open a connection to server. 有新的信息时服务器和客户端可以相互发送信息(Real-time traffi
Socket选择可以指定Socket类发送和接受数据的方式.在JDK1.4中共有8个Socket选择可以设置.这8个选项都定义在java.net.SocketOptions接口中.定义如下: public final static int TCP_NODELAY = 0x0001; public final static int SO_REUSEADDR = 0x04; public final static int SO_LINGER = 0x0080; public final static