Class Server.Connection
Represents a connection to a client.
Inheritance
System.Object
Server.Connection
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Pigeoneer
Assembly: Trail.dll
Syntax
public class Connection
Methods
Close()
Closes the connection.
Declaration
public void Close()
Finalize()
Declaration
protected void Finalize()
GetIP(out IPAddress)
Returns the IP address of the client connected.
Declaration
public Result GetIP(out IPAddress ip)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Net.IPAddress | ip | Output parameter for the IP address. |
Returns
| Type | Description |
|---|---|
| Result | The IP Address |
Send(Byte[], SendMode)
Sends a binary message using the specified SendMode.
Messages are always encrypted (except when running locally).
Declaration
public Result Send(byte[] data, SendMode sendMode)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Byte[] | data | The message content. |
| SendMode | sendMode | How to send the message. |
Returns
| Type | Description |
|---|---|
| Result | Ok, SentReliably, AlreadyClosed |
Events
OnMessage
Sets a callback that is fired when a message is received. data contains the message contents.
Declaration
public event Server.OnMessageCallback OnMessage
Event Type
| Type | Description |
|---|---|
| Server.OnMessageCallback |