summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1996-12-22 22:06:04 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1996-12-22 22:06:04 +0000
commitaa56341042bf18dfb4754e0910113e8e059acc82 (patch)
tree147fc294556751cc24df552768b29a173a22c924 /examples
parentf13a60d21d6b6971654b1b2737dd09fafdbef944 (diff)
downloadATCD-aa56341042bf18dfb4754e0910113e8e059acc82.tar.gz
foo
Diffstat (limited to 'examples')
-rw-r--r--examples/IPC_SAP/SOCK_SAP/C-inclient.cpp14
-rw-r--r--examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp8
2 files changed, 11 insertions, 11 deletions
diff --git a/examples/IPC_SAP/SOCK_SAP/C-inclient.cpp b/examples/IPC_SAP/SOCK_SAP/C-inclient.cpp
index 84526a72421..049bd51d1e6 100644
--- a/examples/IPC_SAP/SOCK_SAP/C-inclient.cpp
+++ b/examples/IPC_SAP/SOCK_SAP/C-inclient.cpp
@@ -21,27 +21,27 @@ main (int argc, char *argv[])
int r_bytes;
int n;
- /* Create a local endpoint of communication */
+ // Create a local endpoint of communication.
if ((s_handle = ACE_OS::socket (PF_INET, SOCK_STREAM, 0)) == ACE_INVALID_HANDLE)
ACE_OS::perror ("socket"), ACE_OS::exit (1);
- /* Determine IP address of the server */
+ // Determine IP address of the server.
if ((hp = ACE_OS::gethostbyname (host)) == 0)
ACE_OS::perror ("gethostbyname"), ACE_OS::exit (1);
- /* Set up the address information to contact the server */
+ // Set up the address information to contact the server.
ACE_OS::memset ((void *) &saddr, 0, sizeof saddr);
saddr.sin_family = AF_INET;
saddr.sin_port = port_num;
ACE_OS::memcpy (&saddr.sin_addr, hp->h_addr, hp->h_length);
- /* Establish connection with remote server */
+ // Establish connection with remote server.
if (ACE_OS::connect (s_handle, (struct sockaddr *) &saddr,
sizeof saddr) == -1)
ACE_OS::perror ("connect"), ACE_OS::exit (1);
- /* Send data to server (correctly handles
- "incomplete writes" due to flow control) */
+ // Send data to server (correctly handles "incomplete writes" due to
+ // flow control).
while ((r_bytes = ACE_OS::read (ACE_STDIN, buf, sizeof buf)) > 0)
for (w_bytes = 0; w_bytes < r_bytes; w_bytes += n)
@@ -52,7 +52,7 @@ main (int argc, char *argv[])
if (ACE_OS::recv (s_handle, buf, 1) == 1)
ACE_OS::write (ACE_STDOUT, buf, 1);
- /* Explicitly close the connection */
+ // Explicitly close the connection.
if (ACE_OS::closesocket (s_handle) == -1)
ACE_OS::perror ("close"), ACE_OS::exit (1);
diff --git a/examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp b/examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp
index 67809a9eee8..de2d0b1f6cb 100644
--- a/examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp
+++ b/examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp
@@ -1,7 +1,7 @@
-// This tests the non-blocking features of the ACE_SOCK_Connector class.
// $Id$
-
+// This tests the non-blocking features of the ACE_SOCK_Connector
+// class.
#include "ace/SOCK_Connector.h"
#include "ace/INET_Addr.h"
@@ -10,8 +10,8 @@
int main (int argc, char *argv[])
{
- char *host = argc > 1 ? argv[1] : ACE_DEFAULT_SERVER_HOST;
- u_short r_port = argc > 2 ? ACE_OS::atoi (argv[2]) : ACE_DEFAULT_SERVER_PORT;
+ char *host = argc > 1 ? argv[1] : ACE_DEFAULT_SERVER_HOST;
+ u_short r_port = argc > 2 ? ACE_OS::atoi (argv[2]) : ACE_DEFAULT_SERVER_PORT;
ACE_Time_Value timeout (argc > 3 ? ACE_OS::atoi (argv[3]) : ACE_DEFAULT_TIMEOUT);
char buf[BUFSIZ];