NetworkConfig

Namespace: TagBites.Net
Assembly: TagBites.Net.dll

Network configuration.

public class NetworkConfig

Constructors

NetworkConfig()

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

public void NetworkConfig()

Result Type: void

NetworkConfig(Encoding)

Initializes a new instance of the TagBites.Net.NetworkConfig class.

public void NetworkConfig(Encoding encoding)

Result Type: void

Parameters

TypeName
EncodingencodingEncoding used to encode/decode socket messages.

NetworkConfig(Encoding, INetworkSerializer)

Initializes a new instance of the TagBites.Net.NetworkConfig class.

public void NetworkConfig(Encoding encoding, INetworkSerializer serializer)

Result Type: void

Parameters

TypeName
EncodingencodingEncoding used to encode/decode socket messages.
INetworkSerializerserializerSerializer used to serialize/deserialize object send through socket.

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

Initializes a new instance of the TagBites.Net.NetworkConfig class.

public void NetworkConfig(Encoding encoding, Action<Stream, object> serializeDelegate, Func<Stream, Type, object> deserializeDelegate)

Result Type: void

Parameters

TypeName
EncodingencodingEncoding used to encode/decode socket messages.
Action<Stream,object>serializeDelegateDelegate used to serialize object send through socket.
Func<Stream,Type,object>deserializeDelegateDelegate used to deserialize object send through socket.

NetworkConfig(INetworkSerializer)

Initializes a new instance of the TagBites.Net.NetworkConfig class.

public void NetworkConfig(INetworkSerializer serializer)

Result Type: void

Parameters

TypeName
INetworkSerializerserializerSerializer used to serialize/deserialize object send through socket.

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

Initializes a new instance of the TagBites.Net.NetworkConfig class.

public void NetworkConfig(Action<Stream, object> serializeDelegate, Func<Stream, Type, object> deserializeDelegate)

Result Type: void

Parameters

TypeName
Action<Stream,object>serializeDelegateDelegate used to serialize object send through socket.
Func<Stream,Type,object>deserializeDelegateDelegate used to deserialize object send through socket.

Properties

Default

Gets or sets default network configuration.

public NetworkConfig Default { get; set; }

Result Type: NetworkConfig

Encoding

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

public Encoding Encoding { get; }

Result Type: Encoding

Serializer

Gets serializer used to serialize/deserialize object send through socket. Default: proxy to System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.

public INetworkSerializer Serializer { get; }

Result Type: INetworkSerializer