NetServer Class |
Namespace: Internal.Lidgren.Network
public class NetServer : NetPeer
The NetServer type exposes the following members.
Name | Description | |
---|---|---|
Configuration |
Gets the configuration used to instanciate this NetPeer
(Inherited from NetPeer.) | |
Connections |
Gets a copy of the list of connections
(Inherited from NetPeer.) | |
ConnectionsCount |
Gets the number of active connections
(Inherited from NetPeer.) | |
MessageReceivedEvent |
Signalling event which can be waited on to determine when a message is queued for reading.
Note that there is no guarantee that after the event is signaled the blocked thread will
find the message in the queue. Other user created threads could be preempted and dequeue
the message before the waiting thread wakes up.
(Inherited from NetPeer.) | |
Port |
Gets the port number this NetPeer is listening and sending on, if Start() has been called
(Inherited from NetPeer.) | |
Socket |
Gets the socket, if Start() has been called
(Inherited from NetPeer.) | |
Statistics |
Statistics on this NetPeer since it was initialized
(Inherited from NetPeer.) | |
Status |
Gets the NetPeerStatus of the NetPeer
(Inherited from NetPeer.) | |
Tag |
Gets or sets the application defined object containing data about the peer
(Inherited from NetPeer.) | |
UniqueIdentifier |
Gets a unique identifier for this NetPeer based on Mac address and ip/port. Note! Not available until Start() has been called!
(Inherited from NetPeer.) | |
UPnP |
Returns an UPnP object if enabled in the NetPeerConfiguration
(Inherited from NetPeer.) |
Name | Description | |
---|---|---|
Connect(IPEndPoint) |
Create a connection to a remote endpoint
(Inherited from NetPeer.) | |
Connect(IPEndPoint, NetOutgoingMessage) |
Create a connection to a remote endpoint
(Inherited from NetPeer.) | |
Connect(String, Int32) |
Create a connection to a remote endpoint
(Inherited from NetPeer.) | |
Connect(String, Int32, NetOutgoingMessage) |
Create a connection to a remote endpoint
(Inherited from NetPeer.) | |
CreateMessage |
Creates a new message for sending
(Inherited from NetPeer.) | |
CreateMessage(Int32) |
Creates a new message for sending
(Inherited from NetPeer.) | |
CreateMessage(String) |
Creates a new message for sending and writes the provided string to it
(Inherited from NetPeer.) | |
DiscoverKnownPeer(IPEndPoint) |
Emit a discovery signal to a single known host
(Inherited from NetPeer.) | |
DiscoverKnownPeer(String, Int32) |
Emit a discovery signal to a single known host
(Inherited from NetPeer.) | |
DiscoverLocalPeers |
Emit a discovery signal to all hosts on your subnet
(Inherited from NetPeer.) | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
FlushSendQueue |
If NetPeerConfiguration.AutoFlushSendQueue() is false; you need to call this to send all messages queued using SendMessage()
(Inherited from NetPeer.) | |
GetConnection |
Get the connection, if any, for a certain remote endpoint
(Inherited from NetPeer.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Introduce |
Send NetIntroduction to hostExternal and clientExternal; introducing client to host
(Inherited from NetPeer.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
RawSend |
Send raw bytes; only used for debugging
(Inherited from NetPeer.) | |
ReadMessage |
Read a pending message from any connection, if any
(Inherited from NetPeer.) | |
ReadMessage(NetIncomingMessage) |
Reads a pending message from any connection, if any.
Returns true if message was read, otherwise false.
(Inherited from NetPeer.) | |
ReadMessages |
Read a pending message from any connection, if any
(Inherited from NetPeer.) | |
Recycle(NetIncomingMessage) |
Recycles a NetIncomingMessage instance for reuse; taking pressure off the garbage collector
(Inherited from NetPeer.) | |
Recycle(IEnumerableNetIncomingMessage) |
Recycles a list of NetIncomingMessage instances for reuse; taking pressure off the garbage collector
(Inherited from NetPeer.) | |
RegisterReceivedCallback |
Call this to register a callback for when a new message arrives
(Inherited from NetPeer.) | |
SendDiscoveryResponse |
Send a discovery response message
(Inherited from NetPeer.) | |
SendMessage(NetOutgoingMessage, NetConnection, NetDeliveryMethod) |
Send a message to a specific connection
(Inherited from NetPeer.) | |
SendMessage(NetOutgoingMessage, NetConnection, NetDeliveryMethod, Int32) |
Send a message to a specific connection
(Inherited from NetPeer.) | |
SendMessage(NetOutgoingMessage, IListNetConnection, NetDeliveryMethod, Int32) |
Send a message to a list of connections
(Inherited from NetPeer.) | |
SendToAll(NetOutgoingMessage, NetDeliveryMethod) |
Send a message to all connections
| |
SendToAll(NetOutgoingMessage, NetDeliveryMethod, Int32) |
Send a message to all connections
| |
SendToAll(NetOutgoingMessage, NetConnection, NetDeliveryMethod, Int32) |
Send a message to all connections except one
| |
SendUnconnectedMessage(NetOutgoingMessage, IListIPEndPoint) |
Send a message to an unconnected host
(Inherited from NetPeer.) | |
SendUnconnectedMessage(NetOutgoingMessage, IPEndPoint) |
Send a message to an unconnected host
(Inherited from NetPeer.) | |
SendUnconnectedMessage(NetOutgoingMessage, String, Int32) |
Send a message to an unconnected host
(Inherited from NetPeer.) | |
SendUnconnectedToSelf |
Send a message to this exact same netpeer (loopback)
(Inherited from NetPeer.) | |
Shutdown |
Disconnects all active connections and closes the socket
(Inherited from NetPeer.) | |
Start |
Binds to socket and spawns the networking thread
(Inherited from NetPeer.) | |
ToString |
Returns a string that represents this object
(Overrides ObjectToString.) | |
UnregisterReceivedCallback |
Call this to unregister a callback, but remember to do it in the same synchronization context!
(Inherited from NetPeer.) | |
WaitMessage |
Read a pending message from any connection, blocking up to maxMillis if needed
(Inherited from NetPeer.) |
Name | Description | |
---|---|---|
MethodInvoke |
Calls the object method by name.
(Defined by ObjectEx.) | |
PropertyGet(String, Object, Boolean) | Overloaded.
Gets the value of the object property by name.
(Defined by ObjectEx.) | |
PropertyGetT(String, Object, Boolean) | Overloaded.
Gets the value of the object property by name.
(Defined by ObjectEx.) | |
PropertySet |
Sets the value of the object property by name.
(Defined by ObjectEx.) |