Documentation
¶
Index ¶
- type Conn
- type ConnState
- type DisconnectionError
- type JsonOutputConn
- type MessageOutputConn
- type PacketLoggingConn
- func (plc *PacketLoggingConn) Read() (encoding.Packet, error)
- func (plc *PacketLoggingConn) Send(p encoding.Packet) error
- func (plc *PacketLoggingConn) SendError(errMsg, errTip string) error
- func (plc *PacketLoggingConn) SendJson(msg string, obj interface{}) error
- func (plc *PacketLoggingConn) SendMessage(msg, message string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn interface { Send(encoding.Packet) error MessageOutputConn JsonOutputConn SendError(string, string) error Read() (encoding.Packet, error) }
func NewConn ¶
func NewConn(with io.ReadWriteCloser) Conn
type DisconnectionError ¶
type DisconnectionError struct {
Err error
}
func (*DisconnectionError) Error ¶
func (e *DisconnectionError) Error() string
type JsonOutputConn ¶
type MessageOutputConn ¶
type PacketLoggingConn ¶
type PacketLoggingConn struct { Conn // contains filtered or unexported fields }
func NewPacketLoggingConn ¶
func NewPacketLoggingConn(conn Conn, logfn func(v ...interface{})) *PacketLoggingConn
func (*PacketLoggingConn) SendError ¶
func (plc *PacketLoggingConn) SendError(errMsg, errTip string) error
func (*PacketLoggingConn) SendJson ¶
func (plc *PacketLoggingConn) SendJson(msg string, obj interface{}) error
func (*PacketLoggingConn) SendMessage ¶
func (plc *PacketLoggingConn) SendMessage(msg, message string) error
Click to show internal directories.
Click to hide internal directories.