From ab701520c43cf41e3bcd21557c681b3279b23dba Mon Sep 17 00:00:00 2001 From: Mark Carpenter Date: Sun, 27 Jul 2025 21:46:54 -0400 Subject: [PATCH] Add IncomingPeerId and IncomingSessionId to Peer --- peer.go | 10 ++++++++++ 1 file changed, 10 insertions(+) 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,