StreamSocket Questions

Please post support and help requests here.
Posts: 13
Joined: 15 Jul 2008, 17:44

StreamSocket Questions

Postby DougE » 22 Sep 2008, 15:48


Is there a way to determine if a socket has been closed other than with a try-catch block?

Is there a way to interrupt a receiveBytes call other than closing the socket?

What condition(s) does the poll(to, SELECT_ERROR) call return true?

It seems that if the peer connection has been closed then the poll(to, SELECT_READ) and poll(to, SELECT_WRITE) will both return true. Can both calls return true without the peer being closed?


Posts: 1268
Joined: 11 Jul 2006, 16:27
Location: Austria

Re: StreamSocket Questions

Postby guenter » 22 Sep 2008, 21:08

Since the POCO sockets API is just a very thin layer above BSD sockets, almost all of the various socket programming issues apply to POCO.
As a first reader, I'd recomment the Unix Socket FAQ (section 2.1 provides the answer to your first question).
To dig deeper, get the excellent Unix Network Programming, Volume 1 by W. Richard Stevens. The ultimate source on everything sockets. (I'd have posted a link to Amazon, but is currently down. OMG!!!)

Return to “Support”

Who is online

Users browsing this forum: No registered users and 2 guests