diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-02-06 17:58:47 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-02-06 17:58:47 +0000 |
commit | ba74e982306a87e9d2a553ae8fc7fc4e45f90d4a (patch) | |
tree | 3fa564bd7a72e8f6a549f4e2a5f9587948e3843d /examples/IOStream/server | |
parent | f2fc925aea4d98acd157cc38d65e6ecc86d739b5 (diff) | |
download | ATCD-ba74e982306a87e9d2a553ae8fc7fc4e45f90d4a.tar.gz |
synch with James
Diffstat (limited to 'examples/IOStream/server')
-rw-r--r-- | examples/IOStream/server/iostream_server.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/examples/IOStream/server/iostream_server.cpp b/examples/IOStream/server/iostream_server.cpp index c4cd945e044..8aab10de103 100644 --- a/examples/IOStream/server/iostream_server.cpp +++ b/examples/IOStream/server/iostream_server.cpp @@ -62,17 +62,18 @@ public: if (!(this -> peer () >> i >> f >> s)) { - cerr << "Error getting data" << endl ; - return - 1 ; + cerr << "Server: Error getting data" << endl ; + return - 1 ; } - cerr << "Received (" << i << ") (" << f << ") (" << s << ")" << endl ; + cerr << "Server Received: (" << i << ") (" << f << ") (" << s << ")" << endl ; - if (!(this -> peer () << "Received (" << i << ") (" << f << ") (" << s << ")" << endl)) + if (!(this -> peer () << "Received: " << i << " " << f << " " << s << endl)) { cerr << __LINE__ << "Error sending data" << endl ; return - 1 ; } + #else if (!(this -> peer () >> i >> f)) { @@ -82,7 +83,7 @@ public: cerr << "Received (" << i << ") (" << f << ")" << endl; - if (!(this -> peer () << "Received (" << i << ") (" << f << ")" << endl)) + if (!(this -> peer () << i << " " << f << endl)) { cerr << __LINE__ << "Error sending data" << endl ; return - 1 ; @@ -92,7 +93,7 @@ public: // sync () function. Some iostreams implementations let us use a // 'flush' function much like the 'endl' function. - this->peer ().sync (); + // this->peer ().sync (); return 0; } }; @@ -121,7 +122,7 @@ main (int argc, char *argv []) Logging_Acceptor peer_acceptor ; - if (peer_acceptor.open (ACE_INET_Addr (argc > 1 ? atoi (argv[1]) : ACE_DEFAULT_SERVER_PORT)) == - 1) + if (peer_acceptor.open (ACE_INET_Addr (argc > 1 ? atoi (argv[1]) : ACE_DEFAULT_SERVER_PORT)) == - 1) ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), - 1); else if (ACE_Service_Config::reactor ()->register_handler |