Documentation ¶
Index ¶
- type Dialer
- type UTPAddr
- type UTPConn
- func (c *UTPConn) Close() error
- func (c *UTPConn) LocalAddr() net.Addr
- func (c *UTPConn) Read(b []byte) (int, error)
- func (c *UTPConn) RemoteAddr() net.Addr
- func (c *UTPConn) SetDeadline(t time.Time) error
- func (c *UTPConn) SetKeepAlive(d time.Duration) error
- func (c *UTPConn) SetReadDeadline(t time.Time) error
- func (c *UTPConn) SetWriteDeadline(t time.Time) error
- func (c *UTPConn) Write(b []byte) (int, error)
- type UTPListener
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dialer ¶
type Dialer struct { // Timeout is the maximum amount of time a dial will wait for // a connect to complete. If Deadline is also set, it may fail // earlier. // // The default is no timeout. // // With or without a timeout, the operating system may impose // its own earlier timeout. For instance, TCP timeouts are // often around 3 minutes. Timeout time.Duration // LocalAddr is the local address to use when dialing an // address. The address must be of a compatible type for the // network being dialed. // If nil, a local address is automatically chosen. LocalAddr net.Addr }
A Dialer contains options for connecting to an address.
The zero value for each field is equivalent to dialing without that option. Dialing with the zero value of Dialer is therefore equivalent to just calling the Dial function.
type UTPAddr ¶
func ResolveUTPAddr ¶
type UTPConn ¶
type UTPConn struct {
// contains filtered or unexported fields
}
func DialUTPTimeout ¶
func (*UTPConn) RemoteAddr ¶
type UTPListener ¶
type UTPListener struct { // RawConn represents an out-of-band connection. // This allows a single socket to handle multiple protocols. RawConn net.PacketConn // contains filtered or unexported fields }
func Listen ¶
func Listen(n, laddr string) (*UTPListener, error)
func (*UTPListener) AcceptUTP ¶
func (l *UTPListener) AcceptUTP() (*UTPConn, error)
func (*UTPListener) Addr ¶
func (l *UTPListener) Addr() net.Addr
func (*UTPListener) Close ¶
func (l *UTPListener) Close() error
func (*UTPListener) SetDeadline ¶
func (l *UTPListener) SetDeadline(t time.Time) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.