This commit is contained in:
crusader 2018-03-22 23:09:11 +09:00
parent a5f2ecff5e
commit 2350199b7c

View File

@ -77,6 +77,19 @@ func (s *netSocket) Context() SocketContext {
return s.ctx return s.ctx
} }
func (s *netSocket) Read(b []byte) (n int, err error) {
n, err = s.Conn.Read(b)
logging.Logger().Debugf("Client Socket: read message[%s]", string(b))
return
}
func (s *netSocket) Write(b []byte) (n int, err error) {
logging.Logger().Debugf("Client Socket: write message[%s]", string(b))
return s.Conn.Write(b)
}
func (s *netSocket) Close() error { func (s *netSocket) Close() error {
err := s.Conn.Close() err := s.Conn.Close()
s.sh.OnDisconnect(s) s.sh.OnDisconnect(s)