Beispiel #1
0
func (p *ENetPeer) Receive(channelID *C.enet_uint8) *ENetPacket {
	return (*ENetPacket)(C.enet_peer_receive((*C.ENetPeer)(p), channelID))
}
Beispiel #2
0
// enet_peer_receive
func (peer *Peer) Receive() ([]byte, uint8) {
	var channel_id C.enet_uint8 = 0
	packet := C.enet_peer_receive(peer.peer, &channel_id)
	return from_packet(packet), uint8(channel_id)
}