#include #include "jonipx.h" #include "dosbuff.h" void main( void ) { game_packet_type packet; string_type string; /* This node address means to broadcast to everyone */ node_address_type node_address = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; int done = 0; char ch; Allocate_Dos_Buffers(); if( !Init_Jonipx() ) { printf("Error initializing IPX \n"); exit(0); } printf("Ipx initialized...\n"); while( !done ) { if( kbhit() ) { ch = getch(); if( ch == 27 ) /* 27 is escape */ { done = 1; } else { fprintf(stderr, "%c", ch ); string[0] = ch; Jon_Send_Packet( string, 1, node_address ); } } /* End if kbhit() */ if( Packet_Ready() ) { Pop_Packet( &packet ); fprintf(stderr, "%c", packet.string[0] ); } /* End if Packet_Ready() */ } /* End of while */ Close_Jonipx(); } /* End of main */