Interface INetworkNode
Represents a single node in the network simulation.
Namespace: SociallyDistant.Core.OS.Network
Assembly: SociallyDistant.Framework.dll
Syntax
public interface INetworkNode
Properties
Tag
Gets or sets a string tag attached to this node. How this gets used depends on the implementation. Device nodes generally use this tag to store the name of the device.
Declaration
string? Tag { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
NetworkUpdate()
CAlled every frame by the game, to give each node a chance to update.
Declaration
void NetworkUpdate()
ResolveDevice(uint, ushort)
Try to find a server given IP address and port. This is used to check whether a given port is open on a given device.
Declaration
PortResolution? ResolveDevice(uint networkAddress, ushort port)
Parameters
Type | Name | Description |
---|---|---|
uint | networkAddress | Any in-game IP address. |
ushort | port | Any network port. |
Returns
Type | Description |
---|---|
PortResolution | A PortResolution value indicating the status of the remote server, if available. Null means that the remote address isn't reachable. |
ResolveNetwork(uint)
Try to find a remote network or device based on IP address.
Declaration
NetworkResolveResult? ResolveNetwork(uint networkAddress)
Parameters
Type | Name | Description |
---|---|---|
uint | networkAddress | Any in-game IP address. |
Returns
Type | Description |
---|---|
NetworkResolveResult | A NetworkResolveResult value indicating the reachability of the remote host. |