Documentation
¶
Overview ¶
Package mem provides a memory implementation of yomo.FrameConn.
Index ¶
- type FrameConn
- func (p *FrameConn) CloseWithError(errString string) error
- func (p *FrameConn) Context() context.Context
- func (p *FrameConn) Handshake(hf *frame.HandshakeFrame) error
- func (p *FrameConn) LocalAddr() net.Addr
- func (p *FrameConn) ReadFrame() (frame.Frame, error)
- func (p *FrameConn) RemoteAddr() net.Addr
- func (p *FrameConn) WriteFrame(f frame.Frame) error
- type Listener
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FrameConn ¶
type FrameConn struct {
// contains filtered or unexported fields
}
FrameConn is an implements of FrameConn, It transmits frames upon the golang channel.
func NewFrameConn ¶
NewFrameConn creates FrameConn from read write channel.
func (*FrameConn) CloseWithError ¶
CloseWithError closes the connection. After calling CloseWithError, ReadFrame and WriteFrame will return frame.ErrConnClosed error.
func (*FrameConn) Handshake ¶
func (p *FrameConn) Handshake(hf *frame.HandshakeFrame) error
Handshake sends a HandshakeFrame to the connection. This function should be called before ReadFrame or WriteFrame.
func (*FrameConn) RemoteAddr ¶
RemoteAddr returns the remote address of connection.
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
Listener listens a net.PacketConn and accepts connections.
Click to show internal directories.
Click to hide internal directories.