diff options
author | nw1 <nw1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-12-19 23:22:39 +0000 |
---|---|---|
committer | nw1 <nw1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-12-19 23:22:39 +0000 |
commit | 092f3e078566f541e977a4ca7310c84e13f65eab (patch) | |
tree | 736b8d60a60b6ee3a9971e9a19670013d7cfff19 /tests | |
parent | 6a2ca6652a2a28c1670d786f7f7f13abec3655aa (diff) | |
download | ATCD-092f3e078566f541e977a4ca7310c84e13f65eab.tar.gz |
Incoporate James CE Johnson's patches.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/IOStream_Test.cpp | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/tests/IOStream_Test.cpp b/tests/IOStream_Test.cpp index b760bf3e28e..c496e4e2a97 100644 --- a/tests/IOStream_Test.cpp +++ b/tests/IOStream_Test.cpp @@ -199,11 +199,31 @@ client (void *arg = 0) ACE_DEBUG ((LM_DEBUG, "(%P|%t) Client Receiving\n")); + ACE_Time_Value timeout (2); + ACE_Time_Value *timeoutp = &timeout; + + server >> timeoutp; + int i; float f1, f2; long l; double d; - server >> i; + + while( !(server >> i) ) + { + int eof = server.eof(); + if( eof ) + { + ACE_DEBUG((LM_DEBUG, "(%P|%t) Unrecoverable stream error/eof\n" )); + break; + } + else + { + ACE_DEBUG((LM_DEBUG, "(%P|%t) Recoverable stream error (timeout)\n" )); + server.clear(0); + } + } + server >> f1; server >> l; server >> f2; @@ -320,6 +340,10 @@ server (void *arg = 0) // filled or when we flush it with an explicit client.sync() command // or the implicit <<endl. + + ACE_DEBUG ((LM_DEBUG, "(%P|%t) Server sleeping\n" )); + ACE_OS::sleep(30); + ACE_DEBUG ((LM_DEBUG, "(%P|%t) Server Sending: 1 .12342134 666555444 23.45 -46.5e9 \n")); client_handler << 1 << " "; client_handler << .12342134 << " "; |