NetServer Members

Lidgren.Network

Collapse imageExpand ImageCopy imageCopyHover image

The NetServer type exposes the following members.

Constructors

  NameDescription
Public methodNetServer
NetServer constructor

Methods

  NameDescription
Public methodConnect(IPEndPoint)
Create a connection to a remote endpoint
(Inherited from NetPeer.)
Public methodConnect(IPEndPoint, NetOutgoingMessage)
Create a connection to a remote endpoint
(Inherited from NetPeer.)
Public methodConnect(String, Int32)
Create a connection to a remote endpoint
(Inherited from NetPeer.)
Public methodConnect(String, Int32, NetOutgoingMessage)
Create a connection to a remote endpoint
(Inherited from NetPeer.)
Public methodCreateMessage()()()()
Creates a new message for sending
(Inherited from NetPeer.)
Public methodCreateMessage(Int32)
Creates a new message for sending
(Inherited from NetPeer.)
Public methodCreateMessage(String)
Creates a new message for sending and writes the provided string to it
(Inherited from NetPeer.)
Public methodDiscoverKnownPeer(IPEndPoint)
Emit a discovery signal to a single known host
(Inherited from NetPeer.)
Public methodDiscoverKnownPeer(String, Int32)
Emit a discovery signal to a single known host
(Inherited from NetPeer.)
Public methodDiscoverLocalPeers
Emit a discovery signal to all hosts on your subnet
(Inherited from NetPeer.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFlushSendQueue
If NetPeerConfiguration.AutoFlushSendQueue() is false; you need to call this to send all messages queued using SendMessage()
(Inherited from NetPeer.)
Public methodGetConnection
Get the connection, if any, for a certain remote endpoint
(Inherited from NetPeer.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIntroduce
Send NetIntroduction to hostExternal and clientExternal; introducing client to host
(Inherited from NetPeer.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRawSend
Send raw bytes; only used for debugging
(Inherited from NetPeer.)
Public methodReadMessage
Read a pending message from any connection, if any
(Inherited from NetPeer.)
Public methodReadMessages
Read a pending message from any connection, if any
(Inherited from NetPeer.)
Public methodRecycle(NetIncomingMessage)
Recycles a NetIncomingMessage instance for reuse; taking pressure off the garbage collector
(Inherited from NetPeer.)
Public methodRecycle(IEnumerable<(Of <<'(NetIncomingMessage>)>>))
Recycles a list of NetIncomingMessage instances for reuse; taking pressure off the garbage collector
(Inherited from NetPeer.)
Public methodRegisterReceivedCallback
Call this to register a callback for when a new message arrives
(Inherited from NetPeer.)
Public methodSendDiscoveryResponse
Send a discovery response message
(Inherited from NetPeer.)
Public methodSendMessage(NetOutgoingMessage, NetConnection, NetDeliveryMethod)
Send a message to a specific connection
(Inherited from NetPeer.)
Public methodSendMessage(NetOutgoingMessage, NetConnection, NetDeliveryMethod, Int32)
Send a message to a specific connection
(Inherited from NetPeer.)
Public methodSendMessage(NetOutgoingMessage, List<(Of <<'(NetConnection>)>>), NetDeliveryMethod, Int32)
Send a message to a list of connections
(Inherited from NetPeer.)
Public methodSendToAll(NetOutgoingMessage, NetDeliveryMethod)
Send a message to all connections
Public methodSendToAll(NetOutgoingMessage, NetConnection, NetDeliveryMethod, Int32)
Send a message to all connections except one
Public methodSendUnconnectedMessage(NetOutgoingMessage, IList<(Of <<'(IPEndPoint>)>>))
Send a message to an unconnected host
(Inherited from NetPeer.)
Public methodSendUnconnectedMessage(NetOutgoingMessage, IPEndPoint)
Send a message to an unconnected host
(Inherited from NetPeer.)
Public methodSendUnconnectedMessage(NetOutgoingMessage, String, Int32)
Send a message to an unconnected host
(Inherited from NetPeer.)
Public methodSendUnconnectedToSelf
Send a message to this exact same netpeer (loopback)
(Inherited from NetPeer.)
Public methodShutdown
Disconnects all active connections and closes the socket
(Inherited from NetPeer.)
Public methodStart
Binds to socket and spawns the networking thread
(Inherited from NetPeer.)
Public methodToString
Returns a string that represents this object
(Overrides Object..::..ToString()()()().)
Public methodWaitMessage
Read a pending message from any connection, blocking up to maxMillis if needed
(Inherited from NetPeer.)

Properties

  NameDescription
Public propertyConfiguration
Gets the configuration used to instanciate this NetPeer
(Inherited from NetPeer.)
Public propertyConnections
Gets a copy of the list of connections
(Inherited from NetPeer.)
Public propertyConnectionsCount
Gets the number of active connections
(Inherited from NetPeer.)
Public propertyMessageReceivedEvent
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.)
Public propertyPort
Gets the port number this NetPeer is listening and sending on, if Start() has been called
(Inherited from NetPeer.)
Public propertySocket
Gets the socket, if Start() has been called
(Inherited from NetPeer.)
Public propertyStatistics
Statistics on this NetPeer since it was initialized
(Inherited from NetPeer.)
Public propertyStatus
Gets the NetPeerStatus of the NetPeer
(Inherited from NetPeer.)
Public propertyTag
Gets or sets the application defined object containing data about the peer
(Inherited from NetPeer.)
Public propertyUniqueIdentifier
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.)
Public propertyUPnP
Returns an UPnP object if enabled in the NetPeerConfiguration
(Inherited from NetPeer.)

See Also