예제 #1
0
        public Protocol(int clientPort, int serverPort, ProtocolEncoding encoding, IProtocolEncryptor encryptor = null)
            : this(serverPort, encoding, encryptor)
        {
            switch (encoding)
            {
            case ProtocolEncoding.Default:
            case ProtocolEncoding.Base64:
                _client = new Base64IpcClient <T>(clientPort, _encryptor);
                break;

            case ProtocolEncoding.UTF8:
                _client = new Utf8IpcClient <T>(clientPort, _encryptor);
                break;
            }
        }
예제 #2
0
        private Protocol(int serverPort, ProtocolEncoding encoding, IProtocolEncryptor encryptor = null)
        {
            Encoding = encoding;

            _encryptor = encryptor;
            _callbacks = new Dictionary <Guid, Action <T> >();

            switch (encoding)
            {
            case ProtocolEncoding.Default:
            case ProtocolEncoding.Base64:
                _server = new Base64IpcServer(serverPort, _encryptor);
                break;

            case ProtocolEncoding.UTF8:
                _server = new Utf8IpcServer(serverPort, _encryptor);
                break;
            }
        }
예제 #3
0
 internal Utf8IpcClient(int portNumber, IProtocolEncryptor encryptor = null)
     : base(portNumber, encryptor)
 {
 }
예제 #4
0
 public Utf8IpcServer(int portNumber, IProtocolEncryptor encryptor = null)
     : base(portNumber, encryptor)
 {
 }
예제 #5
0
 internal BaseIpcClient(int portNumber, IProtocolEncryptor encryptor = null)
 {
     PortNumber = portNumber;
     _encryptor = encryptor;
 }
 internal Base64IpcServer(int portNumber, IProtocolEncryptor encryptor = null)
     : base(portNumber, encryptor)
 {
 }
예제 #7
0
 internal BaseIpcServer(int portNumber, IProtocolEncryptor encryptor = null)
 {
     _portNumber = portNumber;
     _encryptor  = encryptor;
 }