asio 0.3.7 Home | Reference | Tutorial | Examples | Design
Examples

serialization/client.cpp File Reference

Go to the source code of this file.

Namespaces

namespace  s11n_example

Classes

class  s11n_example::client
 Downloads stock quote information from a server. More...

Functions

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


Function Documentation

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

Definition at line 105 of file client.cpp.

00106 {
00107   try
00108   {
00109     // Check command line arguments.
00110     if (argc != 3)
00111     {
00112       std::cerr << "Usage: client <host> <port>" << std::endl;
00113       return 1;
00114     }
00115 
00116     asio::io_service io_service;
00117     s11n_example::client client(io_service, argv[1], argv[2]);
00118     io_service.run();
00119   }
00120   catch (std::exception& e)
00121   {
00122     std::cerr << e.what() << std::endl;
00123   }
00124 
00125   return 0;
00126 }

asio 0.3.7 Home | Reference | Tutorial | Examples | Design