Documentation ¶
Index ¶
- func CreateClient(address string, port uint32) error
- type CompressionModeFlag
- type EnetBase
- func (b *EnetBase) DisableServerRelay()
- func (b *EnetBase) EnableServerRelay()
- func (b *EnetBase) GetPacket() (uint32, int32, []byte)
- func (b *EnetBase) ListenAndServe()
- func (b *EnetBase) Off(name string)
- func (b *EnetBase) On(name string, f interface{})
- func (b *EnetBase) PutPacket()
- func (b *EnetBase) SetInBandwidth(v uint32)
- func (b *EnetBase) SetMaxClients(v uint32)
- func (b *EnetBase) SetOutBandwidth(v uint32)
- func (b *EnetBase) SetPacketChannelSize(size int)
- func (b *EnetBase) SetServerRelayEnabled(enabled bool)
- type EventType
- type Packet
- type PacketFlag
- type SystemChannelFlag
- type SystemMessageFlag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateClient ¶
Types ¶
type CompressionModeFlag ¶
type CompressionModeFlag int32
const ( CompressNone CompressionModeFlag = 0 CompressRangeCoder CompressionModeFlag = 1 CompressFastLZ CompressionModeFlag = 2 CompressZLIB CompressionModeFlag = 3 CompressZSTD CompressionModeFlag = 4 )
func (CompressionModeFlag) Int32 ¶
func (i CompressionModeFlag) Int32() int32
type EnetBase ¶
type EnetBase struct {
// contains filtered or unexported fields
}
func CreateServer ¶
func (*EnetBase) DisableServerRelay ¶
func (b *EnetBase) DisableServerRelay()
func (*EnetBase) EnableServerRelay ¶
func (b *EnetBase) EnableServerRelay()
func (*EnetBase) ListenAndServe ¶
func (b *EnetBase) ListenAndServe()
func (*EnetBase) SetInBandwidth ¶
func (*EnetBase) SetMaxClients ¶
func (*EnetBase) SetOutBandwidth ¶
func (*EnetBase) SetPacketChannelSize ¶
func (*EnetBase) SetServerRelayEnabled ¶
type EventType ¶
type EventType uint32
const ( EventTypeNone EventType = C.ENET_EVENT_TYPE_NONE EventTypeConnect EventType = C.ENET_EVENT_TYPE_CONNECT EventTypeDisconnect EventType = C.ENET_EVENT_TYPE_DISCONNECT EventTypeReceive EventType = C.ENET_EVENT_TYPE_RECEIVE )
type PacketFlag ¶
type PacketFlag uint32
const ( PacketFlagReliable PacketFlag = C.ENET_PACKET_FLAG_RELIABLE PacketFlagUnsequenced PacketFlag = C.ENET_PACKET_FLAG_UNSEQUENCED PacketFlagNoAllocate PacketFlag = C.ENET_PACKET_FLAG_NO_ALLOCATE PacketFlagUnreliableFragment PacketFlag = C.ENET_PACKET_FLAG_UNRELIABLE_FRAGMENT )
type SystemChannelFlag ¶
type SystemChannelFlag int8
const ( SystemChannelConfig SystemChannelFlag = 0 SystemChannelReliable SystemChannelFlag = 1 SystemChannelUnreliable SystemChannelFlag = 2 SystemChannelMax SystemChannelFlag = 3 )
func (SystemChannelFlag) Int8 ¶
func (i SystemChannelFlag) Int8() int8
type SystemMessageFlag ¶
type SystemMessageFlag uint32
const ( SystemMessageAddPeer SystemMessageFlag = 0 SystemMessageRemovePeer SystemMessageFlag = 1 )
func (SystemMessageFlag) Int32 ¶
func (i SystemMessageFlag) Int32() int32
func (SystemMessageFlag) Uint32 ¶
func (i SystemMessageFlag) Uint32() uint32
Click to show internal directories.
Click to hide internal directories.