Skip to content

Commit 1d7f8bd

Browse files
author
Reckhou
committed
修正格式
1 parent 2faab37 commit 1d7f8bd

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

ebook/08.1.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,13 +233,12 @@ TCP有很多连接控制函数,我们平常用到比较多的有如下几个
233233

234234
设置建立连接的超时时间,客户端和服务器端都适用,当超过设置时间时,连接自动关闭。
235235

236-
func (c *TCPConn) SetReadDeadline(t time.Time) error
237-
238-
func (c *TCPConn) SetWriteDeadline(t time.Time) error
236+
func (c *TCPConn) SetReadDeadline(t time.Time) error
237+
func (c *TCPConn) SetWriteDeadline(t time.Time) error
239238

240239
用来设置写入/读取一个连接的超时时间。当超过设置时间时,连接自动关闭。
241240

242-
func (c *TCPConn) SetKeepAlive(keepalive bool) os.Error
241+
func (c *TCPConn) SetKeepAlive(keepalive bool) os.Error
243242

244243
设置客户端是否和服务器端保持长连接,可以降低建立TCP连接时的握手开销,对于一些需要频繁交换数据的应用场景比较适用。
245244

0 commit comments

Comments
 (0)