Can someone provide just a simple example of how to use wxSockets write, because every time I try to use it to write to a connection I get windows coming up with this program has stopped working crap and the only thing I’m doing is using wxSocketBase::Write. Or does anyone know why it is failing?
I have even tried to hardcode the buffer that is supposed to be written with something like this:
wxSocketClient * sockConn = new wxSocketClient();
wxString url = "localhost";
wxIPV4address addr;
addr.Hostname(url);
addr.Service(6667);
sockConn->Connect(addr);
wxString test = wxT("testing");
sockConn->Write(test.mb_str(), wxStrlen(test));
sockConn->Close();
delete sockConn;`
And every time I call write it just fails out
Also is there an easy way to get wxString to work with wxSocket, or should it be easy after I figure out what’s going on here?
Right now its a lot easier to just use winsock to do all this stuff and well that’s not why I have wxWidgets, I got it to make life easier.
Yes, I can: