|Posted by:||Remy Lebeau (TeamB) (firstname.lastname@example.org)|
|Date:||Fri, 19 Dec 2003|
"Craig Williams" <williams.cra…@earthlink.net> wrote in message
> If I create a new instance of TIdSocketList will the
> constructor fill the list with all of the active sockets?
No. They have to be added manually.
> Also, if I want to use a low-level call like getsockopt(), would
> the GStack-> version be slower than just the regular API call?
GStack is meant for providing platform-neutral access to the associated API
for the particular platform that the application is actually running under.
If you know exactly which platform you are under, you could call the API
directly if you want, Indy does not stop you from doing that. In the case
of TIdStack::WSGetSockOpt() in particular, it simply calls
libc::getsockopt() or WinSock::getsockopt(), so the only overhead in using
the GStack version is just a matter of pushing a few extra values on the
stack and making an extra execution jump. Both are trivial in today's CPUs.
TIdSocketList posted by Craig Williams on Fri, 19 Dec 2003