Socket学习笔记

2017-09-19  本文已影响48人  Sniper_Zheng

Socket 套接字

Socket服务端

HTTP的通信:socket() -> bind(端口) -> listen(端口) -> accept() -> read(客户端发的数据) -> write(返回数据) ->close()断开连接

长连接和短连接

群聊

client1 把消息发给server. server再把消息转发给client2, client3.

XMPP(The Extensible Messaging and Presence Protocal)

<Login>
    <userName>zhangsan</userName>
    <password>123</password>
</Login>
上一篇 下一篇

猜你喜欢

热点阅读