asio 0.3.8rc3 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 115 of file client.cpp.

00116 {
00117   try
00118   {
00119     // Check command line arguments.
00120     if (argc != 3)
00121     {
00122       std::cerr << "Usage: client <host> <port>" << std::endl;
00123       return 1;
00124     }
00125 
00126     asio::io_service io_service;
00127     s11n_example::client client(io_service, argv[1], argv[2]);
00128     io_service.run();
00129   }
00130   catch (std::exception& e)
00131   {
00132     std::cerr << e.what() << std::endl;
00133   }
00134 
00135   return 0;
00136 }

asio 0.3.8rc3 Home | Reference | Tutorial | Examples | Design