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
Type | Name | |
---|---|---|
Encoding | encoding | Encoding 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
Type | Name | |
---|---|---|
Encoding | encoding | Encoding used to encode/decode socket messages. |
INetworkSerializer | serializer | Serializer 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
Type | Name | |
---|---|---|
Encoding | encoding | Encoding used to encode/decode socket messages. |
Action<Stream,object> | serializeDelegate | Delegate used to serialize object send through socket. |
Func<Stream,Type,object> | deserializeDelegate | Delegate 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
Type | Name | |
---|---|---|
INetworkSerializer | serializer | Serializer 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
Type | Name | |
---|---|---|
Action<Stream,object> | serializeDelegate | Delegate used to serialize object send through socket. |
Func<Stream,Type,object> | deserializeDelegate | Delegate 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