mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-25 10:09:36 +02:00
Add setReceiveTimeout
This commit is contained in:
@@ -104,9 +104,9 @@ public:
|
|||||||
/// A specialization exists for type void, which doesn't read
|
/// A specialization exists for type void, which doesn't read
|
||||||
/// the reply. If the server sends a reply, it is your
|
/// the reply. If the server sends a reply, it is your
|
||||||
/// responsibility to read it ... (Use this for pipelining)
|
/// responsibility to read it ... (Use this for pipelining)
|
||||||
/// A BadCastException will be thrown when the reply couldn't be
|
/// A BadCastException will be thrown when the reply couldn't be
|
||||||
/// converted. Supported types are Int64, std::string, BulkString,
|
/// converted. Supported types are Int64, std::string, BulkString,
|
||||||
/// Array and void. When the reply is an Error, it will throw
|
/// Array and void. When the reply is an Error, it will throw
|
||||||
/// a RedisException.
|
/// a RedisException.
|
||||||
{
|
{
|
||||||
T result;
|
T result;
|
||||||
@@ -143,6 +143,8 @@ public:
|
|||||||
/// Sends all commands (pipelining) to the Redis server before
|
/// Sends all commands (pipelining) to the Redis server before
|
||||||
/// getting all replies.
|
/// getting all replies.
|
||||||
|
|
||||||
|
void setReceiveTimeout(const Timespan& timeout);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
Client(const Client&);
|
Client(const Client&);
|
||||||
@@ -161,7 +163,7 @@ private:
|
|||||||
/// answer. Can also be used for pipelining commands. Make sure you
|
/// answer. Can also be used for pipelining commands. Make sure you
|
||||||
/// call readReply as many times as you called writeCommand, even when
|
/// call readReply as many times as you called writeCommand, even when
|
||||||
/// an error occurred on a command.
|
/// an error occurred on a command.
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -176,6 +178,11 @@ void Client::execute<void>(const Array& command)
|
|||||||
writeCommand(command);
|
writeCommand(command);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline void Client::setReceiveTimeout(const Timespan& timeout)
|
||||||
|
{
|
||||||
|
_socket.setReceiveTimeout(timeout);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} } // namespace Poco::Redis
|
} } // namespace Poco::Redis
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user