Subversion Repositories factorylink.mb_plus

Rev

Blame | Last modification | View Log | Download

/*name globtest.c*/

/* Copyright (C) Modicon, Inc. 1989,  All Rights Reserved. */

/*
include


*/
#define STRICT
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <conio.h>
#include "netbios.h"
#include "netlib.h"



/*
prototypes


*/
void main( void );


/*
external


*/

/*
macros


*/

/*
global variables


*/
char mbuffer[ 256 ];
NCB netblock;

/*
main()


*/
void main()
{
    int i,j;

    j = 0;

    while( !kbhit() ) {
        for( i = 0; i < 32; i++ )
            mbuffer[ i ] = (char)(i + j);
        printf( "sending datagram\n");
        i = ncb_send_datagram( &netblock, j, mbuffer, 100, 0 ); /* to adapter #0 */
        j++;
        if( j > 32 )
            j = 0;
        printf( "return code was %d\n",i);
        Sleep(1);
    }
}