MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / TCPConn

Method TCPConn

internal/nodes/client_conn_base.go:147–161  ·  view source on GitHub ↗

TCPConn 转换为TCPConn

()

Source from the content-addressed store, hash-verified

145
146// TCPConn 转换为TCPConn
147func (this *BaseClientConn) TCPConn() (tcpConn *net.TCPConn, ok bool) {
148 // 设置包装前连接
149 switch conn := this.rawConn.(type) {
150 case *tls.Conn:
151 var internalConn = conn.NetConn()
152 clientConn, isClientConn := internalConn.(*ClientConn)
153 if isClientConn {
154 return clientConn.TCPConn()
155 }
156 tcpConn, ok = internalConn.(*net.TCPConn)
157 default:
158 tcpConn, ok = this.rawConn.(*net.TCPConn)
159 }
160 return
161}
162
163// SetLinger 设置Linger
164func (this *BaseClientConn) SetLinger(seconds int) error {

Callers 1

SetLingerMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected