SpectatorView/Compositor/SharedHeaders/Network.h
bool SendData(byte* bytes, int len)
    {
        // TODO: Segment packet and send in a loop.
        if (len > DEFAULT_BUFLEN)
        {
            OutputDebugString(L"Error, size is too large.");
            return false;
        }

        int iResult = send(connectSocket, (char*)bytes, len, 0);
        if (iResult == SOCKET_ERROR)
        {
            PrintSocketError(L"Send");
            return false;
        }

        return true;
    }
// TODO: can send data without a recv?
// TODO: fast fail if connection has not been made yet.
// TODO: caller should re-establish connection if failed.
can send data without a recv.
TODO: fast fail if connection has not been made yet.
TODO: caller should re-establish connection if failed.
can send data without a recv . TODO : fast fail if connection has not been made yet . TODO : caller should re - establish connection if failed .
bool SendData(byte* bytes, int len)
    {
        if (len > DEFAULT_BUFLEN)
        {
            OutputDebugString(L"Error, size is too large.");
            return false;
        }
        int iResult = send(connectSocket, (char*)bytes, len, 0);
        if (iResult == SOCKET_ERROR)
        {
            PrintSocketError(L"Send");
            return false;
        }
        return true;
    }
bool SendData ( byte * bytes , int len ) { if ( len > DEFAULT_BUFLEN ) { OutputDebugString ( L" " ) ; return false ; } int iResult = send ( connectSocket , ( char * ) bytes , len , 0 ) ; if ( iResult == SOCKET_ERROR ) { PrintSocketError ( L" " ) ; return false ; } return true ; }
TODO: can send data without a recv?
TODO : can send data without a recv?
// TODO: Segment packet and send in a loop.