コード例 #1
0
ファイル: novdos.c プロジェクト: Azarien/open-watcom-v2
bool RemoteConnect( void )
{
    PostListens();
#ifdef SERVER
    if( !Listening ) {
        _INITSPXECB( Conn, 1, 0, 0 );
        _SPXListenForConnection( 0, 0, &ConnECB );
        Listening = 1;
    } else if( ConnECB.inUseFlag == 0 ) {
        if( ConnECB.completionCode == 0 ) {
            Connection = ConnECB.SPXConnectionID;
            return( true );
        }
    }
    _IPXRelinquishControl();
#else
    _INITECB( SendECB, SendHead, 1, SPX );
    if( _SPXEstablishConnection( 0, 0, &Connection, &SendECB ) == 0 ) {
        if( WaitTimeout( &SendECB, MAX_CONNECT_WAIT, 0 ) ) {
            return( true );
        } else {
            _SPXAbortConnection( Connection );
        }
    }
#endif
    return( false );
}
コード例 #2
0
ファイル: novdos.c プロジェクト: Azarien/open-watcom-v2
static void PostAListen( int i )
{
    _INITECB( RecECB[i], RecHead[i], 2, SPX );
    RecECB[i].fragmentDescriptor[1].address = &Buffer[i];
    RecECB[i].fragmentDescriptor[1].size = sizeof( Buffer[i] );
    _SPXListenForSequencedPacket( &RecECB[i] );
}
コード例 #3
0
ファイル: novnlm.c プロジェクト: pavanvunnava/open-watcom-v2
static void PostAListen( int i )
{
    _DBG_IPX(("Posting RecECB[%d]\r\n", i));
    _INITECB( RecECB[i], RecHead[i], 2, SPX );
    RecECB[i].fragmentDescriptor[1].address = Buffer[i];
    RecECB[i].fragmentDescriptor[1].size = sizeof( Buffer[i] );
    CSPXListenForSequencedPacket( &RecECB[i] );
}
コード例 #4
0
ファイル: novdos.c プロジェクト: Azarien/open-watcom-v2
static trap_retval DoRemotePut( void *data, trap_elen len )
{
    _INITECB( SendECB, SendHead, 2, SPX );
    SendHead.connectControl |= 0x10;
    SendHead.length = _SWAPINT( sizeof( SendHead ) + len );
    SendECB.fragmentDescriptor[1].address = data;
    SendECB.fragmentDescriptor[1].size = len;
    _SPXSendSequencedPacket( Connection, &SendECB );
    WaitOn( SendECB );
    return( len );
}
コード例 #5
0
ファイル: novos2.c プロジェクト: Ukusbobra/open-watcom-v2
static void PostAListen( int i )
{
    WORD        rc;

putstring( "Posting RecECB[i]\r\n" );
    _INITECB( RecECB[i], RecHead[i], 2, SPX )
    RecECB[i].hsem = (HSEM) &RecvSem;
    RecECB[i].fragList[1].fragAddress = &Buffer[i];
    RecECB[i].fragList[1].fragSize = sizeof( Buffer[i] );
    rc = SpxListenForConnectionPacket( Connection, &RecECB[i] );
    putrc( "SPXListenForConnectionPacket", rc );
}