浏览 2088 次
锁定老帖子 主题:gen_tcp 应对对端半关闭
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2008-06-13
shutdown(Socket, How) -> ok | {error, Reason} Types: Socket = socket() How = read | write | read_write Reason = posix() Immediately close a socket in one or two directions. How == write means closing the socket for writing, reading from it is still possible. To be able to handle that the peer has done a shutdown on the write side, the {exit_on_close, false} option is useful. 这样就不会被强制退出了。 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |