00001
00002
00003
00004
00005
00006
00007 #include <iostream>
00008 #include <cstdlib>
00009 #include "ComPlusPlus/ComPlusPlus"
00010
00011 int main (int argc, char *argv [] ) {
00012
00013 if ( argc != 3 ) {
00014 std::cout << "Usage " << argv[0] << " [port] [host]\n";
00015 return 1;
00016 }
00017 int port = atoi(argv [1]);
00018 std::string host = argv[2];
00019
00020 try {
00021
00022 compp::SocketTcp Client;
00023
00024 Client.Connect(host, port) ;
00025
00026 Client.Shutdown();
00027 } catch ( syspp::ComException e ) {
00028 std::cout << "Exception " << e.what() << "\n" ;
00029 }
00030 return 0;
00031 }