thanks for your answer, I agree with the fact of using Bind, I also saw this suggestion in Microsoft documentation I think.
I tried this:
t_mainform->Bind(wxEVT_SOCKET, &TcpIP::OnServerAppEvent, this, C_SERVER_ID_APP, wxID_ANY, (wxObject*)NULL);
void TcpIP::OnServerAppEvent(wxSocketEvent& event)
{
...
}
and it works, compiles without any error.
regarding connect, I get a 'wxSocketEventHandler undefined', despite that I have included wx/socket.h (in which it is defined and enabled) in the source file.
and ok for using a more up to date wxWidgets, I can see that the latest stable is 3.2.6. But I don't understand why the connect was compiling in another project using the same code.