NetworkComms MethodsNetworkComms.Net Help
The NetworkComms type exposes the following members.
Methods

  NameDescription
Public methodStatic memberAllConnectionInfo(Boolean)
Returns a ConnectionInfo array containing information for all connections
Public methodStatic memberAllConnectionInfo(ShortGuid, Boolean)
Returns a ConnectionInfo array containing information for all connections which have the provided networkIdentifier. It is also possible to include information for closed connections.
Public methodStatic memberAppendGlobalConnectionCloseHandler
Add a new connection shutdown delegate which will be called for every connection as it is closes.
Public methodStatic memberAppendGlobalConnectionEstablishHandler
Add a new connection establish delegate which will be called for every connection once it has been successfully established.
Public methodStatic memberAppendGlobalIncomingPacketHandler incomingObjectType (String, NetworkComms PacketHandlerCallBackDelegate incomingObjectType )
Add an incoming packet handler using default SendReceiveOptions. Multiple handlers for the same packet type will be executed in the order they are added.
Public methodStatic memberAppendGlobalIncomingPacketHandler incomingObjectType (String, NetworkComms PacketHandlerCallBackDelegate incomingObjectType , SendReceiveOptions)
Add an incoming packet handler using the provided SendReceiveOptions. Multiple handlers for the same packet type will be executed in the order they are added.
Public methodStatic memberAppendGlobalIncomingUnmanagedPacketHandler
Add an incoming packet handler for unmanaged packets. Multiple handlers will be executed in the order they are added.
Public methodStatic memberCloseAllConnections 
Close all connections
Public methodStatic memberCloseAllConnections(ConnectionType)
Close all connections of the provided ConnectionType
Public methodStatic memberCloseAllConnections(ConnectionType,  EndPoint )
Close all connections of the provided ConnectionType except to provided OnlineEndPoint array.
Public methodStatic memberConnectionExists(ConnectionInfo)
Check if a connection with the provided ConnectionInfo exists. Internally matches connection based on IPEndPoint, ConnectionType, NetworkIdentifier and ApplicationLayerProtocol status.
Public methodStatic memberConnectionExists(ShortGuid, ConnectionType, ApplicationLayerProtocolStatus)
Check if a connection exists with the provided parameters.
Public methodStatic memberConnectionExists(EndPoint, EndPoint, ConnectionType, ApplicationLayerProtocolStatus)
Check if a connection exists with the provided parameters.
Public methodStatic memberDisableLogging
Disable all logging in NetworkCommsDotNet
Public methodStatic memberEnableLogging 
Enable logging using a default config. All log output is written directly to the local console.
Public methodStatic memberEnableLogging(ILogger)
Enable logging using the provided config. See examples for usage.
Public methodStatic memberGetExistingConnection(ApplicationLayerProtocolStatus)
Returns a list of all connections which match the provided parameters. If no parameter are provided returns all connections.
Public methodStatic memberGetExistingConnection(ConnectionInfo)
Retrieve an existing connection with the provided ConnectionInfo. Internally matches connection based on IPEndPoint, ConnectionType, NetworkIdentifier and ApplicationLayerProtocol status.
Public methodStatic memberGetExistingConnection(ConnectionType, ApplicationLayerProtocolStatus)
Returns a list of all connections matching the provided parameters.
Public methodStatic memberGetExistingConnection(ShortGuid, ConnectionType, ApplicationLayerProtocolStatus)
Returns a list of all connections matching the provided parameters.
Public methodStatic memberGetExistingConnection(EndPoint, EndPoint, ConnectionType, ApplicationLayerProtocolStatus)
Returns a list of all connections matching the provided parameters.
Public methodStatic memberGlobalIncomingPacketHandlerExists(String)
Returns true if a global packet handler exists for the provided packet type.
Public methodStatic memberGlobalIncomingPacketHandlerExists packetHandlerIncomingObjectType (String, NetworkComms PacketHandlerCallBackDelegate packetHandlerIncomingObjectType )
Returns true if the provided global packet handler has been added for the provided packet type.
Public methodStatic memberGlobalIncomingUnmanagedPacketHandlerExists 
Returns true if a global unmanaged packet handler exists
Public methodStatic memberGlobalIncomingUnmanagedPacketHandlerExists packetHandlerIncomingObjectType (NetworkComms PacketHandlerCallBackDelegate packetHandlerIncomingObjectType )
Returns true if the provided global unmanaged packet handler has been added.
Public methodStatic memberGlobalPacketTypeUnwrapperOptions
Returns the unwrapper SendReceiveOptions for the provided packet type. If no specific options are registered returns null.
Public methodStatic memberRemoveGlobalConnectionCloseHandler
Remove a connection shutdown delegate.
Public methodStatic memberRemoveGlobalConnectionEstablishHandler
Remove a connection establish delegate.
Public methodStatic memberRemoveGlobalIncomingPacketHandler 
Removes all delegates for all packet types
Public methodStatic memberRemoveGlobalIncomingPacketHandler(String)
Removes all delegates for the provided packet type.
Public methodStatic memberRemoveGlobalIncomingPacketHandler packetHandlerIncomingObjectType (String, NetworkComms PacketHandlerCallBackDelegate packetHandlerIncomingObjectType )
Removes the provided delegate for the specified packet type. If the provided delegate does not exist for this packet type just returns.
Public methodStatic memberRemoveGlobalIncomingUnmanagedPacketHandler 
Removes all unmanaged packet handlers.
Public methodStatic memberRemoveGlobalIncomingUnmanagedPacketHandler packetHandlerIncomingObjectType (NetworkComms PacketHandlerCallBackDelegate packetHandlerIncomingObjectType )
Removes the provided delegate for unmanaged packet types. If the provided delegate does not exist for this packet type just returns.
Public methodStatic memberSendObject sendObjectType 
Send the provided object to the specified destination using TCP. Uses default sendReceiveOptions. For more control over options see connection specific methods.
Public methodStatic memberSendReceiveObject sendObjectType, returnObjectType 
Send the provided object to the specified destination and wait for a return object using TCP. Uses default sendReceiveOptions. For more control over options see connection specific methods.
Public methodStatic memberShutdown
Shutdown all connections, threads and execute OnCommsShutdown event. Any packet handlers are left unchanged. If any network activity has taken place this should be called on application close.
Public methodStatic memberTotalNumConnections 
Returns the total number of connections
Public methodStatic memberTotalNumConnections(IPAddress)
Returns the total number of connections where the RemoteEndPoint matches the provided OnlineIPAddress
Public methodStatic memberTriggerGlobalPacketHandlers(PacketHeader, Connection, MemoryStream, SendReceiveOptions)
Trigger incoming packet delegates for the provided parameters.
Public methodStatic memberTriggerGlobalPacketHandlers(PacketHeader, Connection, MemoryStream, SendReceiveOptions, Boolean)
Trigger incoming packet delegates for the provided parameters.
Back to Top
See Also