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