Documentation ¶
Overview ¶
refs:
https://en.wikipedia.org/wiki/User_Datagram_Protocol https://en.wikipedia.org/wiki/Stream_Control_Transmission_Protocol https://tools.ietf.org/html/rfc4960 https://en.wikipedia.org/wiki/Datagram_Congestion_Control_Protocol
Index ¶
- Variables
- func NewClientSocket(conn *net.UDPConn, raddr *net.UDPAddr) (*ClientSocket, *Conn, error)
- type ClientSocket
- type Conn
- func (c *Conn) Close() error
- func (c *Conn) LocalAddr() net.Addr
- func (c *Conn) Ping() (time.Duration, error)
- func (c *Conn) Read(p []byte) (n int, err error)
- func (c *Conn) RecvMsg() ([]byte, error)
- func (c *Conn) RemoteAddr() net.Addr
- func (c *Conn) SendMsg(message []byte) error
- func (c *Conn) String() string
- func (c *Conn) Write(p []byte) (n int, err error)
- type SIUInt16Slice
- type ServerSocket
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrTimeout is commont timeout error ErrTimeout = errors.New("timeout") // ErrConnectionShutdown is a chan single of connection shutdown ErrConnectionShutdown = errors.New("connection is shutdown") // ErrSegTypeUnknown is the error abount unknown message type ErrSegTypeUnknown = errors.New("unknown message type") )
Functions ¶
func NewClientSocket ¶
NewClientSocket create a client socket
Types ¶
type ClientSocket ¶
type ClientSocket struct {
// contains filtered or unexported fields
}
ClientSocket is a UDP implement of Socket
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn is a UDP implement of es.Conn
func (*Conn) RemoteAddr ¶
RemoteAddr get the address of remote endpoint
type SIUInt16Slice ¶
type SIUInt16Slice []uint16
SIUInt16Slice define a uint16 slice sort interface
func (SIUInt16Slice) Len ¶
func (c SIUInt16Slice) Len() int
func (SIUInt16Slice) Less ¶
func (c SIUInt16Slice) Less(i, j int) bool
func (SIUInt16Slice) Swap ¶
func (c SIUInt16Slice) Swap(i, j int)
type ServerSocket ¶
type ServerSocket struct {
// contains filtered or unexported fields
}
ServerSocket is a UDP implement of socket
func NewServerSocket ¶
func NewServerSocket(conn *net.UDPConn) (*ServerSocket, error)
NewServerSocket create a UDPConn
Click to show internal directories.
Click to hide internal directories.