Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientImplOnRTP ¶
type ClientImplOnRTP struct { core.AbstractSubject[[]byte] // contains filtered or unexported fields }
func NewRtpClient ¶
func NewRtpClient(id string, address string) *ClientImplOnRTP
func (*ClientImplOnRTP) Close ¶
func (c *ClientImplOnRTP) Close()
func (*ClientImplOnRTP) Open ¶
func (c *ClientImplOnRTP) Open() error
func (*ClientImplOnRTP) Write ¶
func (c *ClientImplOnRTP) Write(data []byte) error
type Packet ¶
type Packet struct { Type PacketType Data []byte }
Packet 连接状态也通过该数据包回调
func NewPacket ¶
func NewPacket(t PacketType, data []byte) *Packet
type PacketType ¶
type PacketType int
const ( PacketTypeConnected PacketType = 0 // 连接成功 PacketTypeConnectLost PacketType = 1 // 连接断开 PacketTypeData PacketType = 2 // 数据包 )
func (PacketType) ToString ¶
func (p PacketType) ToString() string
type TcpClient ¶
type TcpClient struct { core.AbstractSubject[*Packet] // contains filtered or unexported fields }
TcpClient TCP客户端
func NewTcpClient ¶
Click to show internal directories.
Click to hide internal directories.