mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-15 08:14:46 +08:00
新增判断连接状态接口
This commit is contained in:
@@ -111,3 +111,7 @@ func (tcpConn *TCPConn) ReadMsg() ([]byte, error) {
|
||||
func (tcpConn *TCPConn) WriteMsg(args ...[]byte) error {
|
||||
return tcpConn.msgParser.Write(tcpConn, args...)
|
||||
}
|
||||
|
||||
func (tcpConn *TCPConn) IsConnected() bool {
|
||||
return tcpConn.closeFlag == false
|
||||
}
|
||||
Reference in New Issue
Block a user