diff --git a/peer.go b/peer.go index 234e032..5c5733f 100644 --- a/peer.go +++ b/peer.go @@ -13,6 +13,8 @@ import ( type Peer interface { GetAddress() Address GetConnectId() uint + GetIncomingPeerId() uint16 + GetIncomingSessionId() uint8 Disconnect(data uint32) DisconnectNow(data uint32) @@ -64,6 +66,14 @@ func (peer enetPeer) GetConnectId() uint { return uint(peer.cPeer.connectID) } +func (peer enetPeer) GetIncomingPeerId() uint16 { + return uint16(peer.cPeer.incomingPeerID) +} + +func (peer enetPeer) GetIncomingSessionId() uint8 { + return uint8(peer.cPeer.incomingSessionID) +} + func (peer enetPeer) Disconnect(data uint32) { C.enet_peer_disconnect( peer.cPeer,