| Back to logs list
141529 2010 年 11 月 30 日 19:20 Reading (loading. ..) Comments (0) Category: Previous log
the server side
① sock (), create stream socket, return the socket sentence handle sListen.
② bind (), associated with a local address to socket sListen.
③ listen (),
new balance sneakers, backlog value set to enter the listening state
④ accept (), wait to accept client connection requests. ; ;
⑤ establish a connection,
new balance running shoes, accept returns, get a new socket,
new balance shoes,
Mabinogi Closed skills start method (has been updated to 7) - Qzone log, such as sClient.
⑥ recv () / send (),
new balance 574, send and receive data in the socket sClient until the completion of the exchange.
⑦ closesocket (), close the socket sClient. ⑦ -> ④ cycle ;
⑧ closesocket (),
new new balance shoes, close the listening socket sListen, service ends.
; ;
Client
① socket (),,
new balance mens, create stream socket s.
② connect (),
转贴(暴笑)我和老公的那些害羞事儿 - Qzone日志, the socket s with the server.
③ recv () / send (), send and receive data on the socket until the completion of data exchange
④ closesocket (), closes the socket s, end of the TCP conversation