Documentation
¶
Index ¶
- Constants
- type Obj
- func (s *Obj) AsBaseConn() base.Conn
- func (s *Obj) ClientServe(baseCtx context.Context) (err error)
- func (s *Obj) Close() (err error)
- func (s *Obj) Connect(baseCtx context.Context, config *base.Config) (err error)
- func (s *Obj) Create(baseCtx context.Context, network string, config *base.Config) (err error)
- func (s *Obj) IsConnected() bool
- func (s *Obj) Join(ctx context.Context, done chan bool)
- func (s *Obj) RawWrite(ctx context.Context, data []byte) (n int, err error)
- func (s *Obj) ReadThrough(data []byte) (n int, err error)
- func (s *Obj) RemoteAddr() net.Addr
- func (s *Obj) Serve(baseCtx context.Context) (err error)
- func (s *Obj) Write(data *base.UdpPacket)
- func (s *Obj) WriteThrough(data []byte) (n int, err error)
- func (s *Obj) WriteTo(remoteAddr *net.UDPAddr, data []byte)
- type Opt
Constants ¶
View Source
const ( DefaultPacketSize = 4096 DefaultPacketQueueSize = 1024 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Obj ¶
type Obj struct { log.Logger protocol.InterceptorHolder WriteTimeout time.Duration // contains filtered or unexported fields }
func (*Obj) AsBaseConn ¶
func (*Obj) IsConnected ¶
func (*Obj) ReadThrough ¶
ReadThrough read binary data to a connected *UDPConn (via udp.Obj.Create())
func (*Obj) RemoteAddr ¶
func (*Obj) WriteThrough ¶
WriteThrough send binary data to a connected *UDPConn (via udp.Obj.Create())
Click to show internal directories.
Click to hide internal directories.