mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-28 03:20:11 +01:00
GH #136: EchoServer issue.
This commit is contained in:
@@ -131,9 +131,13 @@ public:
|
|||||||
|
|
||||||
void onSocketReadable(const AutoPtr<ReadableNotification>& pNf)
|
void onSocketReadable(const AutoPtr<ReadableNotification>& pNf)
|
||||||
{
|
{
|
||||||
// receive bytes and transfer(echo) them to the output FIFO buffer
|
// some socket implementations (windows) report available
|
||||||
int len = _socket.receiveBytes(_fifoIn);
|
// bytes on client disconnect, so we double-check here
|
||||||
_fifoIn.drain(_fifoOut.write(_fifoIn.buffer()));
|
if (_socket.available())
|
||||||
|
{
|
||||||
|
int len = _socket.receiveBytes(_fifoIn);
|
||||||
|
_fifoIn.drain(_fifoOut.write(_fifoIn.buffer()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void onSocketWritable(const AutoPtr<WritableNotification>& pNf)
|
void onSocketWritable(const AutoPtr<WritableNotification>& pNf)
|
||||||
|
|||||||
Reference in New Issue
Block a user