Added debuf printf()s to GSocket,
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -714,6 +714,8 @@ int GSocket_Write(GSocket *socket, const char *buffer, int size)
|
||||
int ret;
|
||||
|
||||
assert(socket != NULL);
|
||||
|
||||
printf( "GSocket_Write #1, size %d\n", size );
|
||||
|
||||
if (socket->m_fd == -1 || socket->m_server)
|
||||
{
|
||||
@@ -721,16 +723,22 @@ int GSocket_Write(GSocket *socket, const char *buffer, int size)
|
||||
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)
|
||||
@@ -747,6 +755,8 @@ int GSocket_Write(GSocket *socket, const char *buffer, int size)
|
||||
return -1;
|
||||
}
|
||||
|
||||
printf( "GSocket_Write #5, size %d ret %d\n", size, ret );
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user