MCPcopy Create free account
hub / github.com/Cyinx/einx / WriteMsg

Method WriteMsg

network/tcp_conn.go:84–95  ·  view source on GitHub ↗
(msg_id ProtoTypeID, b []byte)

Source from the content-addressed store, hash-verified

82var write_pool *sync.Pool = &sync.Pool{New: func() interface{} { return new(WriteWrapper) }}
83
84func (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
97func (this *TcpConn) RpcCall(msg_id ProtoTypeID, b []byte) bool {
98 if this.IsClosed() == true {

Callers

nothing calls this directly

Calls 3

IsClosedMethod · 0.95
do_push_writeMethod · 0.95
GetMethod · 0.65

Tested by

no test coverage detected