X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6a8a90fe15142da68af29e97a207ef6221d684dd..4863951a5fb9d4167f7c6c360bcd06535624e4bb:/samples/sockets/baseclient.cpp?ds=sidebyside diff --git a/samples/sockets/baseclient.cpp b/samples/sockets/baseclient.cpp index f763eec800..b7a84d492a 100644 --- a/samples/sockets/baseclient.cpp +++ b/samples/sockets/baseclient.cpp @@ -6,7 +6,7 @@ // Created: 27.06.2005 // RCS-ID: $Id$ // Copyright: (c) 2005 Lukasz Michalski -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // ============================================================================ @@ -306,9 +306,9 @@ Client::OnExit() return 0; } -// Create buffer to be sent by client. Buffer contains test indicator +// Create buffer to be sent by client. Buffer contains test indicator // message size and place for data -// msgsize parameter contains size of data in bytes and +// msgsize parameter contains size of data in bytes and // if input value does not fit into 250 bytes then // on exit is updated to new value that is multiply of 1024 bytes char* @@ -318,7 +318,7 @@ Client::CreateBuffer(int* msgsize) char* buf; //if message should have more than 256 bytes then set it as //test3 for compatibility with GUI server sample - if ((*msgsize) > 250) + if ((*msgsize) > 250) { //send at least one kb of data int size = (*msgsize)/1024 + 1; @@ -614,7 +614,9 @@ EventWorker::OnSocketEvent(wxSocketEvent& pEvent) { //wxLogMessage(wxT("EventWorker: got connection")); wxLogMessage(wxT("%s: starting writing message (2 bytes for signature and %d bytes of data to write)"),CreateIdent(m_localaddr).c_str(),m_outsize-2); if (!m_clientSocket->GetLocal(m_localaddr)) + { wxLogError(_("Cannot get peer data for socket %p"),m_clientSocket); + } m_currentType = WorkerEvent::SENDING; wxLogDebug(wxT("%s: CONNECTING"),CreateIdent(m_localaddr).c_str()); SendEvent(false);