#include "../network/adhoc_client.h"
#include <unistd.h>

const int N_MSG = 10;

main(int argc, char **argv)
{	
	int i;
	char msg[5];

	if (argc != 2) {
      printf("usage: testSB <IPaddress>");
      exit(1);
    }
    
    network_client *c = new network_client();
    sleep(1);
	//send multiple datagrams as they may get lost
	for (i = 0; i < N_MSG ; i++) {
		msg[0] = 'a' + i;
		msg[1] = '\0'; 
        int r = c->send((node_id) inet_network(argv[1]), msg, 2);
        if (r < 0)
          return 0;
	}	
    sleep (10);
}
  
