m_sock->SetFlags(wxSOCKET_WAITALL);
// Note that len is in kbytes here!
- len = 32;
+ // Also note that Linux kernel 2.0.36 gives up at len > 27.
+ len = 28;
buf1 = new char[len * 1024];
buf2 = new char[len * 1024];
sock->SetFlags(wxSOCKET_WAITALL);
sock->Read(&len, 1);
+
buf = new char[len * 1024];
sock->Read(buf, len * 1024);
sock->Write(buf, len * 1024);
int ret;
assert(socket != NULL);
+
+ printf( "GSocket_Write #1, size %d\n", size );
if (socket->m_fd == -1 || socket->m_server)
{
return -1;
}
+ printf( "GSocket_Write #2, size %d\n", size );
+
/* If the socket is blocking, wait for writability (with a timeout) */
if (_GSocket_Output_Timeout(socket) == GSOCK_TIMEDOUT)
return -1;
+ printf( "GSocket_Write #3, size %d\n", size );
+
/* Write the data */
if (socket->m_stream)
ret = _GSocket_Send_Stream(socket, buffer, size);
else
ret = _GSocket_Send_Dgram(socket, buffer, size);
+ printf( "GSocket_Write #4, size %d\n", size );
+
if (ret == -1)
{
if (errno == EWOULDBLOCK)
return -1;
}
+ printf( "GSocket_Write #5, size %d ret %d\n", size, ret );
+
return ret;
}