mirror of
https://github.com/duanhf2012/origin.git
synced 2026-03-12 11:07:53 +08:00
TcpService新增设置内存池接口
This commit is contained in:
@@ -38,7 +38,7 @@ func newTCPConn(conn net.Conn, pendingWriteNum int, msgParser *MsgParser) *TCPCo
|
||||
break
|
||||
}
|
||||
_, err := conn.Write(b)
|
||||
ReleaseByteSlice(b)
|
||||
tcpConn.msgParser.ReleaseByteSlice(b)
|
||||
|
||||
if err != nil {
|
||||
break
|
||||
@@ -126,7 +126,7 @@ func (tcpConn *TCPConn) ReadMsg() ([]byte, error) {
|
||||
}
|
||||
|
||||
func (tcpConn *TCPConn) ReleaseReadMsg(byteBuff []byte){
|
||||
ReleaseByteSlice(byteBuff)
|
||||
tcpConn.msgParser.ReleaseByteSlice(byteBuff)
|
||||
}
|
||||
|
||||
func (tcpConn *TCPConn) WriteMsg(args ...[]byte) error {
|
||||
|
||||
Reference in New Issue
Block a user