#include <iostream>
#include <cstdlib>

#include "SysPlusPlus"
#include "ComPlusPlus"


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

  if ( argc != 3 ) {
    std::cout << "Usage: " << argv [0] << " port group \n";	
  	exit(1);
  }
  
 int SPort = atoi (argv[1]);
 std::string MGS = argv[2];

try {	
  char buf[1000];
  std::memset( (void*)buf, 0, sizeof ( buf ) );
  compp::SocketUdp Clnt;

  // -> Comment 1
  Clnt.Sendto("Hello Multi1!", strlen("Hello Multi1!")+1, MGS, SPort);  
  return 0;
} catch ( syspp::ComException e ) {
  std::cout << "Exception " << e.what( ) << "\n" ;	
  perror ( "Multicast Test");	
}  	
}
