Interface INetConnection
- Namespace
- BSGameLib.Networking
- Assembly
- BSGameLib.Networking.dll
A connection to a peer: a client, as the server sees it.
public interface INetConnection
Properties
Buffer
Storage for the application's use. BSGameLib does not read or write it.
byte[] Buffer { get; set; }
Property Value
- byte[]
IpAddress
The peer's address, without its port: "127.0.0.1" or "::1".
string IpAddress { get; }
Property Value
RemoteId
An identifier for the connection, unique among the connections the server has accepted.
long RemoteId { get; }
Property Value
RemotePort
The peer's port.
int RemotePort { get; }
Property Value
Methods
Disconnect(string)
Closes the connection. reason is sent to the peer.
void Disconnect(string reason)
Parameters
reasonstring
Send(IDataPacket)
Not supported on a connection: throws NotSupportedException. Send through IServerAdapter or IClientAdapter instead.
void Send(IDataPacket packet)
Parameters
packetIDataPacket