I was making this program and the server wont send to the client
<pre><code>void CApplication::SendData( const char pBuffer[] )
{
    if( pBuffer == NULL )
    {
        Log()-&gt;Write( ELogMessageType_ERROR, "Cannot send NULL message.");
        return;
    }
    // calculate the size of that data
    unsigned long messageSize = strlen( pBuffer );

    // fix our byte ordering
    messageSize = htonl( messageSize );

    if( isServer == true )
    {
        for( unsigned int i = ESocket_CLIENT0; i &lt; ESocket_MAX; ++i )
        {
            // send the message size
            if( m_Socket[ i ] &gt; 0 )
            {
                if( send( m_Socket[ i ], (char*)&amp;messageSize, sizeof( messageSize ), 0 ) == SOCKET_ERROR )
                {
                    Log()-&gt;Write( ELogMessageType_ERROR, "[Application] Send error: %i to socket %i", WSAGetLastError(), m_Socket[ i ] );
                    continue;
                }

                // fix our message size back to host ordering
                messageSize = ntohl(messageSize);

                // send the actual message
                if( send( m_Socket[ i ], pBuffer, messageSize, 0 ) == SOCKET_ERROR )
                {
                    Log()-&gt;Write( ELogMessageType_ERROR, "[Application] Send error: %i to socket %i", WSAGetLastError(), m_Socket[ i ] );
                    continue;
                }

                Log()-&gt;Write( ELogMessageType_MESSAGE, "[Application] SEND: %s", pBuffer );
            }
        }
    }
</code></pre>
