diff options
author | Steve Huston <shuston@riverace.com> | 2001-01-31 17:22:47 +0000 |
---|---|---|
committer | Steve Huston <shuston@riverace.com> | 2001-01-31 17:22:47 +0000 |
commit | 803d13ce2399f62466b99a71c90452b460cff39d (patch) | |
tree | b2bfa645b8d22d606b31599cd626c42f89b3baff /docs/tutorials | |
parent | 0db9e6a0f675e2e8c4e6f77ddb62b83ef53bb4ef (diff) | |
download | ATCD-803d13ce2399f62466b99a71c90452b460cff39d.tar.gz |
ChangeLogTag:Wed Jan 31 12:19:51 2001 Steve Huston <shuston@riverace.com>
Diffstat (limited to 'docs/tutorials')
-rw-r--r-- | docs/tutorials/Chap_2/Chap_2.zip | bin | 6712 -> 9758 bytes | |||
-rw-r--r-- | docs/tutorials/Chap_2/ex03.html | 7 | ||||
-rw-r--r-- | docs/tutorials/Chap_2/ex04.html | 7 |
3 files changed, 8 insertions, 6 deletions
diff --git a/docs/tutorials/Chap_2/Chap_2.zip b/docs/tutorials/Chap_2/Chap_2.zip Binary files differindex e9201ef1925..fb356b7ee09 100644 --- a/docs/tutorials/Chap_2/Chap_2.zip +++ b/docs/tutorials/Chap_2/Chap_2.zip diff --git a/docs/tutorials/Chap_2/ex03.html b/docs/tutorials/Chap_2/ex03.html index 92882ac0a71..69e4a57c3c1 100644 --- a/docs/tutorials/Chap_2/ex03.html +++ b/docs/tutorials/Chap_2/ex03.html @@ -41,7 +41,7 @@ Accept it and display it.</FONT> <BR><FONT COLOR="#FF0000">// After recieveing data immediately send some data back to the remote.</FONT> <BR>int accept_data(){ -<BR> while(local_.recv(data_buf,SIZE_DATA,remote_addr_)!=-1){ +<BR> while(local_.recv(data_buf,DATA_BUFFER_SIZE,remote_addr_)!=-1){ <BR> ACE_DEBUG((LM_DEBUG, "Data received from remote %s was %s \n" <BR> ,remote_addr_.get_host_name(), data_buf)); <BR> ACE_OS::sleep(1); @@ -57,9 +57,9 @@ the datagram component local_</FONT> <BR>int send_data(){ <BR> ACE_DEBUG((LM_DEBUG,"Preparing to send reply to client %s:%d\n", <BR> remote_addr_.get_host_name(),remote_addr_.get_port_number())); -<BR> ACE_OS::sprintf(data_buf,"Server says hello to you too"); +<BR> ACE_OS::strcpy(data_buf,"Server says hello to you too"); <BR> if( -<BR> local_.send(data_buf, ACE_OS::strlen(data_buf),remote_addr_)==-1) +<BR> local_.send(data_buf, ACE_OS::strlen(data_buf)+1,remote_addr_)==-1) <BR> return -1; <BR> else <BR> return 0; @@ -75,6 +75,7 @@ the datagram component local_</FONT> <P>int main(int argc, char *argv[]){ <BR> Server server(ACE_OS::atoi(argv[1])); <BR> server.accept_data(); +<BR> return 0; <BR>} <P> <A HREF="ex04.html">Next Example</A> diff --git a/docs/tutorials/Chap_2/ex04.html b/docs/tutorials/Chap_2/ex04.html index e2a2c541487..716251de4ec 100644 --- a/docs/tutorials/Chap_2/ex04.html +++ b/docs/tutorials/Chap_2/ex04.html @@ -40,7 +40,7 @@ Mechanisms in ACE).</FONT> <BR><FONT COLOR="#FF0000">//Accept data from the remote host using the datgram component local_</FONT> <BR>int accept_data(){ -<BR> if(local_.recv(data_buf,SIZE_DATA,remote_addr_)!=-1){ +<BR> if(local_.recv(data_buf,DATA_BUFFER_SIZE,remote_addr_)!=-1){ <BR> ACE_DEBUG((LM_DEBUG, "Data received from remote server %s <BR> was: %s \n" ,remote_addr_.get_host_name(), data_buf)); @@ -56,10 +56,10 @@ sent wait for a reply from</FONT> <BR>int send_data(){ <BR> ACE_DEBUG((LM_DEBUG,"Preparing to send data to server %s:%d\n", <BR> remote_addr_.get_host_name(),remote_addr_.get_port_number())); -<BR> ACE_OS::sprintf(data_buf,"Client says hello"); +<BR> ACE_OS::strcpy(data_buf,"Client says hello"); <BR> <BR> while(local_.send -<BR> (data_buf,ACE_OS::strlen(data_buf),remote_addr_)!=-1){ +<BR> (data_buf,ACE_OS::strlen(data_buf)+1,remote_addr_)!=-1){ <BR> ACE_OS::sleep(1); <BR> if(accept_data()==-1) <BR> break; @@ -81,6 +81,7 @@ sent wait for a reply from</FONT> <BR> } <BR>Client client(argv[1],ACE_OS::atoi(argv[2])); <BR>client.send_data(); +<BR>return 0; <BR>} <BR> <BR> <A HREF="ex05.html">Next Example</A> |