diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-04-08 17:12:53 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-04-08 17:12:53 +0000 |
commit | 0922352a55775ec9ba589d82955d231977da60ae (patch) | |
tree | b2d2cc62c8017259e46d11dc4036e8499890228a /examples/IOStream/client/iostream_client.cpp | |
parent | 0e0618ea227e7768bac5f5b3f2f1e72c4bfb3c85 (diff) | |
download | ATCD-0_8_1.tar.gz |
This commit was manufactured by cvs2svn to create tag 'v0_8_1'.v0_8_1
Diffstat (limited to 'examples/IOStream/client/iostream_client.cpp')
-rw-r--r-- | examples/IOStream/client/iostream_client.cpp | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/examples/IOStream/client/iostream_client.cpp b/examples/IOStream/client/iostream_client.cpp deleted file mode 100644 index 1d909d17853..00000000000 --- a/examples/IOStream/client/iostream_client.cpp +++ /dev/null @@ -1,49 +0,0 @@ -#include "ace/SOCK_Connector.h" -#include "ace/IOStream.h" - -int main (int argc, char *argv[]) -{ - char *server_host = argc > 1 ? argv[1] : ACE_DEFAULT_SERVER_HOST; - u_short server_port = argc > 2 ? ACE_OS::atoi (argv[2]) : ACE_DEFAULT_SERVER_PORT; - - ACE_IOStream<ACE_SOCK_Stream> server; - ACE_SOCK_Connector connector; - ACE_INET_Addr addr (server_port, server_host); - - if (connector.connect (server, addr) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), -1); - - server << "1 2.3 testing" << endl; // Buffer up some things to send to the server. - - int i; - float f; - -#if defined (__GNUC__) - String s1; - String s2; - server >> s1 >> i >> f >> s2; - - cerr << "Server said:\n\t"; - cerr << s1 << " "; - cerr << i << " "; - cerr << f << " "; - cerr << s2 << endl; -#else - server >> i >> f; - - cerr << "Server said:\n\t"; - cerr << i << " "; - cerr << f << endl; -#endif /* __GNUC__ */ - - if (server.close () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "close"), -1); - - return 0; -} - - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_IOStream <ACE_SOCK_Stream>; -template class ACE_Streambuf <ACE_SOCK_Stream>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ |