Overview
Features
Download
Documentation
Community
Add-Ons & Services

StreamSocket Questions

Please post support and help requests here.

StreamSocket Questions

Postby DougE » 22 Sep 2008, 15:48

Hi,

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?

(:confused:)
DougE
 
Posts: 13
Joined: 15 Jul 2008, 17:44

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 http://www.faqs.org/faqs/unix-faq/socket/ 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 amazon.com is currently down. OMG!!!)
guenter
 
Posts: 1112
Joined: 11 Jul 2006, 16:27
Location: Austria


Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest