diff options
| author | omagdy <omar.professional8777@gmail.com> | 2025-07-23 03:06:26 +0300 |
|---|---|---|
| committer | omagdy <omar.professional8777@gmail.com> | 2025-07-23 03:06:26 +0300 |
| commit | 089ed7f549eaf82fb7bc3c46616b19615c55d72a (patch) | |
| tree | df0e4eeed7f8cb069b5adacd0dfa88f67d10bcf0 /src/resp_commands.rs | |
| parent | 21a90f12690729f3f4aaca64d413e9e5d8dc0bd4 (diff) | |
| download | redis-rust-089ed7f549eaf82fb7bc3c46616b19615c55d72a.tar.xz redis-rust-089ed7f549eaf82fb7bc3c46616b19615c55d72a.zip | |
feat: Added second step in the handshake process
Diffstat (limited to 'src/resp_commands.rs')
| -rw-r--r-- | src/resp_commands.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/resp_commands.rs b/src/resp_commands.rs index 554c296..dcb717f 100644 --- a/src/resp_commands.rs +++ b/src/resp_commands.rs @@ -117,6 +117,7 @@ pub enum RedisCommands { ConfigGet(String), Keys(String), Info(String), + ReplConf((String, String)), Invalid, } @@ -251,6 +252,9 @@ impl RedisCommands { .to_vec(); RT::BulkString(response).to_resp_bytes() } + RC::ReplConf((_, _)) => { + resp_bytes!("OK") + } RC::Invalid => todo!(), } } @@ -432,6 +436,15 @@ impl From<RespType> for RedisCommands { } Self::Invalid } + "REPLCONF" => { + let Some(op1) = args.next() else { + return Self::Invalid; + }; + let Some(op2) = args.next() else { + return Self::Invalid; + }; + Self::ReplConf((op1, op2)) + } _ => Self::Invalid, } } |
