Documentation ¶
Index ¶
- Constants
- type Conn
- func (c *Conn) Close() error
- func (c *Conn) LocalAddr() net.Addr
- func (c *Conn) Read(b []byte) (n int, err error)
- func (c *Conn) RemoteAddr() net.Addr
- func (c *Conn) SetDeadline(t time.Time) error
- func (c *Conn) SetReadDeadline(t time.Time) error
- func (c *Conn) SetWriteDeadline(t time.Time) error
- func (c *Conn) Write(b []byte) (n int, err error)
- type Message
- type Multiplexer
- type UUID
Constants ¶
View Source
const CloseMessage byte = 2
View Source
const DataMessage byte = 1
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
func NewConn ¶
func NewConn(m *Multiplexer, id UUID) *Conn
func (*Conn) RemoteAddr ¶
RemoteAddr returns the remote network address.
func (*Conn) SetDeadline ¶
SetDeadline sets the read and write deadlines associated with the connection. It is equivalent to calling both SetReadDeadline and SetWriteDeadline.
func (*Conn) SetReadDeadline ¶
SetReadDeadline sets the deadline for future Read calls.
func (*Conn) SetWriteDeadline ¶
SetWriteDeadline sets the deadline for future Write calls.
type Multiplexer ¶
type Multiplexer struct {
// contains filtered or unexported fields
}
func New ¶
func New(conn net.Conn) *Multiplexer
func (*Multiplexer) Accept ¶
func (m *Multiplexer) Accept() (c net.Conn, err error)
Accept waits for and returns the next connection to the listener.
func (*Multiplexer) Addr ¶
func (m *Multiplexer) Addr() net.Addr
Addr returns the listener's network address.
func (*Multiplexer) Close ¶
func (m *Multiplexer) Close() error
Close closes the listener. Any blocked Accept operations will be unblocked and return errors.
Click to show internal directories.
Click to hide internal directories.