(msg_id ProtoTypeID, b []byte)
| 82 | var write_pool *sync.Pool = &sync.Pool{New: func() interface{} { return new(WriteWrapper) }} |
| 83 | |
| 84 | func (this *TcpConn) WriteMsg(msg_id ProtoTypeID, b []byte) bool { |
| 85 | if this.IsClosed() == true { |
| 86 | return false |
| 87 | } |
| 88 | |
| 89 | wrapper := write_pool.Get().(*WriteWrapper) |
| 90 | wrapper.msg_type = 'P' |
| 91 | wrapper.msg_id = msg_id |
| 92 | wrapper.buffer = b |
| 93 | |
| 94 | return this.do_push_write(wrapper) |
| 95 | } |
| 96 | |
| 97 | func (this *TcpConn) RpcCall(msg_id ProtoTypeID, b []byte) bool { |
| 98 | if this.IsClosed() == true { |
nothing calls this directly
no test coverage detected