mirror of
https://github.com/codecat/go-enet.git
synced 2025-12-07 13:39:48 +00:00
Merge pull request #18 from mcarpenter622/Add-Additional-Datapoints-to-Peer
This commit is contained in:
commit
ae229138f1
1 changed files with 10 additions and 0 deletions
10
peer.go
10
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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue