Documentation ¶
Index ¶
- type ReliableUDP
- func (r *ReliableUDP) CancelGlobalReceive()
- func (r *ReliableUDP) Close()
- func (r *ReliableUDP) LocalAddr() net.Addr
- func (r *ReliableUDP) Receive(addr *net.UDPAddr, timeout time.Duration) ([]byte, error)
- func (r *ReliableUDP) ReceiveAll(timeout time.Duration) ([]byte, *net.UDPAddr, error)
- func (r *ReliableUDP) Send(addr *net.UDPAddr, data []byte, timeout time.Duration) error
- func (r *ReliableUDP) SendUnreliable(data []byte, addr *net.UDPAddr) error
- func (r *ReliableUDP) SetGlobalReceive()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReliableUDP ¶
type ReliableUDP struct {
// contains filtered or unexported fields
}
func (*ReliableUDP) LocalAddr ¶
func (r *ReliableUDP) LocalAddr() net.Addr
func (*ReliableUDP) ReceiveAll ¶
func (*ReliableUDP) SendUnreliable ¶
func (r *ReliableUDP) SendUnreliable(data []byte, addr *net.UDPAddr) error
不可靠的udp发送,并发安全
func (*ReliableUDP) SetGlobalReceive ¶
func (r *ReliableUDP) SetGlobalReceive()
设置全局接收,如果设置了全局接收,那么Receive函数将不再接收数据包,而是将数据包发送到全局接收通道
Click to show internal directories.
Click to hide internal directories.