* Implemented according to Apple CFSocket documentation:
kCFSocketConnectCallBack: Called in response to a successful connect() and
of course applies to client sockets only. Fails assertion if received
from a server socket. Calls GSocket's Detected_Write otherwise.
kCFSocketReadCallBack: Called whenever data is available to read or in
the event that a new connection is waiting to be accepted. Call's
GSocket's Detected_Read.
kCFSocketWriteCallBack: Called whenever data can be written to kernel buffer.
Call's GSocket's Detected_Write
* Added ALL_CALLBACK_TYPES macro which specifies all of the above three.
* Added (by virtue of ALL_CALLBACK_TYPES) the kCFSocketConnectCallBack to
the calls to CFSocketCreateWithNative and CFSocketDisableCallBacks during
GUI socket data creation.
* Use the default flags for CFSocket which automatically reenable the
callbacks, but continue to disable close of fd on CFSocket invalidation.
Eventually, GSocket should allow the GUI implementation to override close
so that we can avoid calling the > 10.2 CFSocketSetSocketFlags function.
* CFRelease the socket after invalidating it (fixes memory leak)
* When adding/removing callbacks use kCFSocketReadCallBack for server
GSOCK_CONNECTION and kCFSocketConnectCallback for client.
* When adding/removing callbacks GSOCK_LOST should do the same thing as
GSOCK_INPUT (Thanks Kevin Hock)
* When enabling events, do not enable kCFSocketConnectCallBack for servers.
It should never be called anyway since connect() should never be used
on a server socket.
* When disabling events, disable ALL_CALLBACK_TYPES.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24999
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775