+void MyFrame::OnSockRequest(wxSocketEvent& evt)
+{
+ /* this routine gets called from within the
+ waiting socket thread, i.e. here we are
+ not in the main GUI thread and thus we
+ must not call any GUI function here. */
+ /* Wrong ! This routine is called by the main GUI thread
+ because the main GUI thread received a signal from the other
+ thread using wxEvent::ProcessThreadEvent */
+
+ wxSocketBase *sock = evt.Socket();
+
+ printf("OnSockRequest OK\n");
+ printf("OnSockRequest (event = %d)\n",evt.SocketEvent());
+ switch (evt.SocketEvent()) {
+ case wxSocketBase::EVT_READ: