public async Task <bool> Connect(FakeSocketProvider fakeSocketProvider)
    {
        if (_server == null)
        {
            _server = new NetworkServer();
        }
        _server.RegisterListener(this);
        ((NetworkServer)_server).StartListening(fakeSocketProvider);

        return(true);
    }
 public RedisClientService(FakeSocketProvider fakeSocketProvider)
 {
     _fakeSocketProvider = fakeSocketProvider;
     _client             = new NetworkClient();
 }
Exemplo n.º 3
0
 public async Task Connect(FakeSocketProvider provider)
 {
     _socket = new FakeSocketProvider.FakeSocket(provider, "Client"); // Name is set for test purposes
     await _socket.ConnectAsync();
 }
Exemplo n.º 4
0
 public void StartListening(FakeSocketProvider fakeSocketProvider)
 {
     _fakeSocketProvider = fakeSocketProvider;
     Task.Run(Listen);
 }
Exemplo n.º 5
0
 public FakeSocket(FakeSocketProvider fakeSocketProvider, string name = default(string))
 {
     Name = name;
     _fakeSocketProvider = fakeSocketProvider;
 }