Documentation
¶
Index ¶
- Constants
- Variables
- func NewBaseServer(udpConn *net.UDPConn, context context.Context) *baseServer
- type Addr
- type BaseServer
- type BasicConn
- func (c *BasicConn) Close() error
- func (c *BasicConn) GetContext() context.Context
- func (c *BasicConn) LocalAddr() net.Addr
- func (c *BasicConn) ReadFrom(p []byte) (n int, addr net.Addr, err error)
- func (c *BasicConn) SetReadBuffer(bytes int) error
- func (c *BasicConn) SetReadDeadline(t time.Time) error
- func (c *BasicConn) SetWriteBuffer(bytes int) error
- func (c *BasicConn) WaitClose()
- func (c *BasicConn) WriteTo(ps []byte, rAddr net.Addr) (n int, err error)
- type Connection
- type Listener
- type WriteToFunc
Constants ¶
View Source
const MaxPacketBufferSize = 1452
View Source
const MaxSeqNum uint16 = 0x7FFF
Variables ¶
View Source
var ErrConnNumOver = errors.New("conn number Over")
Functions ¶
Types ¶
type BaseServer ¶
type BasicConn ¶ added in v0.0.17
type BasicConn struct { net.PacketConn UDPConn *net.UDPConn // contains filtered or unexported fields }
func NewBasicConn ¶
func (*BasicConn) GetContext ¶ added in v0.0.17
func (*BasicConn) SetReadBuffer ¶ added in v0.0.17
func (*BasicConn) SetReadDeadline ¶ added in v0.0.17
func (*BasicConn) SetWriteBuffer ¶ added in v0.0.17
type Connection ¶
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
func (*Listener) Accept ¶
func (l *Listener) Accept() (Connection, error)
func (*Listener) GetClientConn ¶
func (l *Listener) GetClientConn() (net.PacketConn, error)
func (*Listener) GetServerConn ¶
func (l *Listener) GetServerConn() (net.PacketConn, error)
Click to show internal directories.
Click to hide internal directories.