public T Call <T>(RedisCommand <T> command) { ConnectIfNotConnected(); try { if (IsPipelined) { return(_pipeline.Write(command)); } _writer.Write(command, _stream); return(command.Parse(_reader)); } catch (IOException) { if (ReconnectAttempts == 0) { throw; } Reconnect(); return(Call(command)); } }
public T Write <T>(RedisCommand <T> command) { _writer.Write(command, _buffer); _parsers.Enqueue(() => command.Parse(_reader)); return(default(T)); }
public void Write(RedisCommand command) { _messages.Enqueue(Tuple.Create(_written.Position, _writer.Write(command, _written))); }