NetworkConfig
Namespace: TagBites.Net
Assembly: TagBites.Net.dll
Product: TagBites.Net v. 1.0.3
Network configuration.
public class NetworkConfigInheritance: object → NetworkConfig
Constructors
Section titled “Constructors”NetworkConfig()
Section titled “NetworkConfig()”Initializes a new instance of the NetworkConfig class, with default configuration.
public NetworkConfig()NetworkConfig(Encoding)
Section titled “NetworkConfig(Encoding)”Initializes a new instance of the NetworkConfig class.
public NetworkConfig(Encoding encoding)Parameters
Section titled “Parameters”encodingEncoding
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)Parameters
Section titled “Parameters”encodingEncoding
Encoding used to encode/decode socket messages.serializerINetworkSerializer
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)Parameters
Section titled “Parameters”encodingEncoding
Encoding used to encode/decode socket messages.serializeDelegateAction<Stream, object>
Delegate used to serialize object send through socket.deserializeDelegateFunc<Stream, Type, object>
Delegate used to deserialize object send through socket.
NetworkConfig(INetworkSerializer)
Section titled “NetworkConfig(INetworkSerializer)”Initializes a new instance of the NetworkConfig class.
public NetworkConfig(INetworkSerializer serializer)Parameters
Section titled “Parameters”serializerINetworkSerializer
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)Parameters
Section titled “Parameters”serializeDelegateAction<Stream, object>
Delegate used to serialize object send through socket.deserializeDelegateFunc<Stream, Type, object>
Delegate used to deserialize object send through socket.
Properties
Section titled “Properties”Default
Section titled “Default”Gets or sets default network configuration.
public static NetworkConfig Default { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”Used by every Server and Client created without an explicit configuration.
Encoding
Section titled “Encoding”Gets encoding used to encode/decode socket messages. Default: UTF8.
public Encoding Encoding { get; }Property Value
Section titled “Property Value”Serializer
Section titled “Serializer”Gets serializer used to serialize/deserialize object send through socket. Default: Json.NET based implementation.
public INetworkSerializer Serializer { get; }