Skip to content
Auto
Products

NetworkConfig

Namespace: TagBites.Net
Assembly: TagBites.Net.dll
Product: TagBites.Net v. 1.0.3

Network configuration.

public class NetworkConfig

Inheritance: object → NetworkConfig

Initializes a new instance of the NetworkConfig class, with default configuration.

public NetworkConfig()

Initializes a new instance of the NetworkConfig class.

public NetworkConfig(Encoding encoding)
  • encoding Encoding
    Encoding used to encode/decode socket messages.

NetworkConfig(Encoding, INetworkSerializer)

Section titled “NetworkConfig(Encoding, INetworkSerializer)”

Initializes a new instance of the NetworkConfig class.

public NetworkConfig(Encoding encoding, INetworkSerializer serializer)
  • encoding Encoding
    Encoding used to encode/decode socket messages.
  • serializer INetworkSerializer
    Serializer used to serialize/deserialize object send through socket.

NetworkConfig(Encoding, Action<Stream, object>, Func<Stream, Type, object>)

Section titled “NetworkConfig(Encoding, Action<Stream, object>, Func<Stream, Type, object>)”

Initializes a new instance of the NetworkConfig class.

public NetworkConfig(Encoding encoding, Action<Stream, object> serializeDelegate, Func<Stream, Type, object> deserializeDelegate)
  • encoding Encoding
    Encoding used to encode/decode socket messages.
  • serializeDelegate Action<Stream, object>
    Delegate used to serialize object send through socket.
  • deserializeDelegate Func<Stream, Type, object>
    Delegate used to deserialize object send through socket.

Initializes a new instance of the NetworkConfig class.

public NetworkConfig(INetworkSerializer serializer)
  • serializer INetworkSerializer
    Serializer used to serialize/deserialize object send through socket.

NetworkConfig(Action<Stream, object>, Func<Stream, Type, object>)

Section titled “NetworkConfig(Action<Stream, object>, Func<Stream, Type, object>)”

Initializes a new instance of the NetworkConfig class.

public NetworkConfig(Action<Stream, object> serializeDelegate, Func<Stream, Type, object> deserializeDelegate)
  • serializeDelegate Action<Stream, object>
    Delegate used to serialize object send through socket.
  • deserializeDelegate Func<Stream, Type, object>
    Delegate used to deserialize object send through socket.

Gets or sets default network configuration.

public static NetworkConfig Default { get; set; }

NetworkConfig

Used by every Server and Client created without an explicit configuration.

Gets encoding used to encode/decode socket messages. Default: UTF8.

public Encoding Encoding { get; }

Encoding

Gets serializer used to serialize/deserialize object send through socket. Default: Json.NET based implementation.

public INetworkSerializer Serializer { get; }

INetworkSerializer