summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjcej <jcej@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-11-30 18:17:02 +0000
committerjcej <jcej@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-11-30 18:17:02 +0000
commit6cea8d1fbf5b467f1084e7136bc6e906bf129aae (patch)
treec22508dbd8f919b067b61dba7fe15684e9572378
parent85e485378a6681bcbd6aa78b1aad3f77f688e6a7 (diff)
downloadATCD-6cea8d1fbf5b467f1084e7136bc6e906bf129aae.tar.gz
*** empty log message ***
-rw-r--r--ChangeLog-98b9
-rw-r--r--docs/tutorials/001/logger.h12
-rw-r--r--docs/tutorials/001/page04.html12
-rw-r--r--docs/tutorials/003/client.cpp6
-rw-r--r--docs/tutorials/003/page01.html6
5 files changed, 45 insertions, 0 deletions
diff --git a/ChangeLog-98b b/ChangeLog-98b
index 13e00ec05d3..cb99ff1b4bb 100644
--- a/ChangeLog-98b
+++ b/ChangeLog-98b
@@ -1,3 +1,12 @@
+Mon Nov 29 13:16:53 EST 1998 James CE Johnson <jcej@lads.com>
+
+ * docs/tutorials/001/logger.h:
+ * docs/tutorials/001/page04.html:
+ * docs/tutorials/003/client.cpp:
+ * docs/tutorials/003/page01.html:
+ Added a blurb about the additional parameters to the recv(),
+ recv_n(), send() and send_n() method calls of ACE_SOCK_Stream.
+
Sun Nov 29 22:14:32 1998 David L. Levine <levine@cs.wustl.edu>
* ace/OS.i,cpp (exit): with ACE_HAS_NON_STATIC_OBJECT_MANAGER,
diff --git a/docs/tutorials/001/logger.h b/docs/tutorials/001/logger.h
index 6e46176fd6e..33cb20678ad 100644
--- a/docs/tutorials/001/logger.h
+++ b/docs/tutorials/001/logger.h
@@ -105,8 +105,20 @@ protected:
if there wasn't *some* kind of activity and a closed connection looks like a
read request to the reactor. But when you read from a closed connection you'll
read zero bytes.
+
Notice that in the error case or closed case we return -1. That tells the reactor
to call our handle_close() where we'll take care of shutting down cleanly.
+
+ Although we don't make use of them, there are additional parameters you can
+ use with the recv() call. One of these is an ACE_Time_Value that allows you to
+ limit the amount of time blocking on the recv(). You would use that if you
+ weren't sure if data was available. Since we only get to handle_input() when
+ data is ready, that would be redundant. On the other hand, if you use recv_n()
+ to read *exactly* a number of bytes then limiting the time you wait for those
+ bytes might be good.
+ The other paramter that may come in handy is an integer <i>flags</i>. This is
+ passed directly to the underlying OS recv() call. See the man page recv(2)
+ and the header sys/socket.h for the gory details.
*/
switch( this->cli_stream_.recv(buf,sizeof buf) )
{
diff --git a/docs/tutorials/001/page04.html b/docs/tutorials/001/page04.html
index 5223bb34282..5472a3dec49 100644
--- a/docs/tutorials/001/page04.html
+++ b/docs/tutorials/001/page04.html
@@ -122,8 +122,20 @@ protected:
if there wasn't *some* kind of activity and a closed connection looks like a
read request to the reactor. But when you read from a closed connection you'll
read zero bytes.
+
Notice that in the error case or closed case we return -1. That tells the reactor
to call our handle_close() where we'll take care of shutting down cleanly.
+
+ Although we don't make use of them, there are additional parameters you can
+ use with the recv() call. One of these is an ACE_Time_Value that allows you to
+ limit the amount of time blocking on the recv(). You would use that if you
+ weren't sure if data was available. Since we only get to handle_input() when
+ data is ready, that would be redundant. On the other hand, if you use recv_n()
+ to read *exactly* a number of bytes then limiting the time you wait for those
+ bytes might be good.
+ The other paramter that may come in handy is an integer <i>flags</i>. This is
+ passed directly to the underlying OS recv() call. See the man page recv(2)
+ and the header sys/socket.h for the gory details.
*/
switch( this->cli_stream_.recv(buf,sizeof buf) )
{
diff --git a/docs/tutorials/003/client.cpp b/docs/tutorials/003/client.cpp
index 0886729b4e7..29bb77d2ce3 100644
--- a/docs/tutorials/003/client.cpp
+++ b/docs/tutorials/003/client.cpp
@@ -75,6 +75,12 @@ int main (int argc, char *argv[])
doesn't send all of the data, it is up to you to program things such that it will
keep trying until all of the data is sent or simply give up. The send_n() function
already does the "keep tyring" option for us, so we use it.
+
+ Like the send() method used in the servers we've seen, there are two additional
+ parameters you can use on the send() and send_n() method calls. The timeout
+ parameter limits the amount of time the system will attempt to send the data
+ to the peer. The flags parameter is passed directly to the OS send() system
+ call. See send(2) for the valid flags values.
*/
if (server.send_n ( buf, strlen(buf) ) == -1)
{
diff --git a/docs/tutorials/003/page01.html b/docs/tutorials/003/page01.html
index cbb0a47c8bc..075fc2888e4 100644
--- a/docs/tutorials/003/page01.html
+++ b/docs/tutorials/003/page01.html
@@ -96,6 +96,12 @@ int main (int argc, char *argv[])
doesn't send all of the data, it is up to you to program things such that it will
keep trying until all of the data is sent or simply give up. The send_n() function
already does the "keep tyring" option for us, so we use it.
+
+ Like the send() method used in the servers we've seen, there are two additional
+ parameters you can use on the send() and send_n() method calls. The timeout
+ parameter limits the amount of time the system will attempt to send the data
+ to the peer. The flags parameter is passed directly to the OS send() system
+ call. See send(2) for the valid flags values.
*/
if (server.send_n ( buf, strlen(buf) ) == -1)
{