func NewCodec(rwc io.ReadWriteCloser) *Codec {
	return &Codec{
		relay: socket.NewSocketRelay(rwc),
		codec: sync.Map{},

		bPool: sync.Pool{New: func() interface{} {
			return new(bytes.Buffer)
		}},

		fPool: sync.Pool{New: func() interface{} {
			return frame.NewFrame()
		}},
	}
}
// NewCodec initiates new server rpc codec over socket connection.
NewCodec initiates new server rpc codec over socket connection.
// NewCodec initiates new server rpc codec over socket connection .
func NewCodec(rwc io.ReadWriteCloser) *Codec {
	return &Codec{
		relay: socket.NewSocketRelay(rwc),
		codec: sync.Map{},
		bPool: sync.Pool{New: func() interface{} {
			return new(bytes.Buffer)
		}},
		fPool: sync.Pool{New: func() interface{} {
			return frame.NewFrame()
		}},
	}
}
func NewCodec ( rwc io . ReadWriteCloser ) * Codec { return & Codec { relay : socket . NewSocketRelay ( rwc ) , codec : sync . Map { } , bPool : sync . Pool { New : func ( ) interface { } { return new ( bytes . Buffer ) } } , fPool : sync . Pool { New : func ( ) interface { } { return frame . NewFrame ( ) } } , } }
NewCodec initiates new server rpc codec over socket connection.
NewCodec initiates new server rpc codec over socket connection .