I am trying to write connection pool using hiredis
.
Problem I am facing is , if user fires a command and didn't read the response from the connection, I should be clearing the response from that connection before putting to connection pool.
Is there any way to check:
- Is there more data to read? So I can do
redisGetReply
, till all data get cleared. - Or is there a way to clear all pending read on connection object ?