#include "spread.h"

int main( int argc, char *argv[] ) {
  Usage( argc, argv );

  sp_connect (my_infSpread.spreadName, my_infSpread.user, my_infSpread.privateGroup, &my_infSpread.Mbox);

  //sp_heartbeat ();

  sp_initEventHandler (my_infSpread.Mbox);

  E_attach_fd( 0, READ_FD, User_command, 0, NULL, LOW_PRIORITY );

  Print_menu();

  printf("\nUser> ");
  fflush(stdout);

  Num_sent = 0;

  //createThread ((void *) sp_eventHandler, NULL, NULL);

  sp_startHandler ();
 
  return( 0 );
}
