07/01/03 14:59:14
>>534
そうだよなあ。
とりあえず、がんがって次のようなバグレポを書き込んだ。
意味が通るかどうかは全く自信が無いw
Hello.
I'm a Japanse, so please forgive my poor English.
When I tested "EchoServer" sample, I found that it doesn't send back FIN to the client when the client sends FIN to the "EchoServer", by calling shutdown().
This is because "EchoServer" doesn't call close() function for this socket.
Why is that?
Poco::Net::StreamSocketImpl is refcounted, and close() is called when it is really destructed.
I found that Poco::Net::SocketReactor's member, _pReadableNotification, _pWritableNotification, etc. holds Poco::Net::Socket instance, until next socket event arises.
So, until then, refcount remains 1, and close() is never called.
In Poco::Net::SocketReactor::run(),
member function dispatch() is called for each socket.
I think, after that, the socket which is held by _pReadableNotification, etc. must be immediately cleared, so Poco::Net::StreamSocketImpl's refcount will be 0, and close() will be called.