protected CommunicatorClientBase(NetPeerConfiguration configuration, ConverterBase converter, string host, int port)
 {
     Converter    = converter;
     _host        = host;
     _port        = port;
     NetConnector = new NetClient(configuration);
     NetEncryptor = new ClientTripleDesNetEncryptor(NetConnector, 1024);
     Initialize(typeof(IProviderContract), typeof(ICallbackContract));
 }
 protected CommunicatorProviderBase(NetPeerConfiguration configuration, ConverterBase converter, IAuthenticator authenticator = null, string[] requiredAuthenticationRoles = null)
 {
     Configuration = configuration;
     Converter     = converter;
     if (authenticator != null)
     {
         RequiredAuthenticationRoles = requiredAuthenticationRoles;
         configuration.EnableMessageType(NetIncomingMessageType.ConnectionApproval);
     }
     NetConnector  = new NetServer(configuration);
     NetEncryptor  = new ServerTripleDesNetEncryptor(NetConnector, 4096);
     Authenticator = authenticator;
     Initialize(typeof(ICallbackContract), typeof(IProviderContract));
 }