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:
Robert Roebling
2000-03-12 21:26:48 +00:00
parent 6e7b6cc6f7
commit 856bc99a57
5 changed files with 15 additions and 3 deletions

View File

@@ -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;
}