summaryrefslogtreecommitdiff
path: root/docs/tutorials/009/page04.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/tutorials/009/page04.html')
-rw-r--r--docs/tutorials/009/page04.html74
1 files changed, 0 insertions, 74 deletions
diff --git a/docs/tutorials/009/page04.html b/docs/tutorials/009/page04.html
deleted file mode 100644
index e1875503b8c..00000000000
--- a/docs/tutorials/009/page04.html
+++ /dev/null
@@ -1,74 +0,0 @@
-<HTML>
-<HEAD>
- <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
- <META NAME="GENERATOR" CONTENT="Mozilla/4.04 [en] (X11; I; Linux 2.0.32 i486) [Netscape]">
- <META NAME="Author" CONTENT="James CE Johnson">
- <TITLE>ACE Tutorial 009</TITLE>
-</HEAD>
-<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#000FFF" VLINK="#FF0F0F">
-
-<CENTER><B><FONT SIZE=+2>ACE Tutorial 009</FONT></B></CENTER>
-
-<CENTER><B><FONT SIZE=+2>Sending and receiving datagrams again</FONT></B></CENTER>
-
-
-<P>
-<HR WIDTH="100%">
-
-<P>As you can see in <A HREF="broadcast_client.cpp">broadcast_client.cpp</A>,
-there isn't enough difference to even comment on!&nbsp; Look back to the
-Tutorial 8 version of this file.&nbsp; The only difference is the addition
-of the timeout variable passed to recv().
-
-<P>
-<HR WIDTH="100%"><TT></TT>
-
-<P><TT>#include "ace/SOCK_Dgram_Bcast.h"</TT>
-<BR><TT>#include "ace/INET_Addr.h"</TT><TT></TT>
-
-<P><TT>static const u_short PORT = ACE_DEFAULT_SERVER_PORT;</TT><TT></TT>
-
-<P><TT>int main (int argc, char *argv[])</TT>
-<BR><TT>{</TT>
-<BR><TT>&nbsp; ACE_INET_Addr local ((u_short) 0);</TT>
-<BR><TT>&nbsp; ACE_INET_Addr remote (PORT, INADDR_BROADCAST);</TT>
-<BR><TT>&nbsp; ACE_SOCK_Dgram_Bcast dgram;</TT><TT></TT>
-
-<P><TT>&nbsp; if (dgram.open (local) == -1)</TT>
-<BR><TT>&nbsp; {</TT>
-<BR><TT>&nbsp;&nbsp;&nbsp; ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"),
--1);</TT>
-<BR><TT>&nbsp; }</TT><TT></TT>
-
-<P><TT>&nbsp; char buf[512];</TT><TT></TT>
-
-<P><TT>&nbsp; sprintf (buf, argc > 1 ? argv[1] : "Hello World!");</TT><TT></TT>
-
-<P><TT>&nbsp; if (dgram.send (buf, strlen (buf) + 1, remote) == -1)</TT>
-<BR><TT>&nbsp; {</TT>
-<BR><TT>&nbsp;&nbsp;&nbsp; ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "send"),
--1);</TT>
-<BR><TT>&nbsp; }</TT><TT></TT>
-
-<P><TT>&nbsp; ACE_Time_Value timeout (2, 0);</TT>
-<BR><TT>&nbsp; if (dgram.recv (buf, sizeof (buf), remote, 0, &amp;timeout)
-== -1)</TT>
-<BR><TT>&nbsp; {</TT>
-<BR><TT>&nbsp;&nbsp;&nbsp; ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "recv"),
--1);</TT>
-<BR><TT>&nbsp; }</TT><TT></TT>
-
-<P><TT>&nbsp; ACE_DEBUG ((LM_DEBUG, "(%P|%t) The server at (%s) said (%s)\n",</TT>
-<BR><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-remote.get_host_name (), buf));</TT><TT></TT>
-
-<P><TT>&nbsp; return (0);</TT>
-<BR><TT>}</TT>
-
-<P>
-<HR WIDTH="100%">
-<CENTER>[<A HREF="..">Tutorial Index</A>] [<A HREF="page05.html">Continue
-This Tutorial</A>]</CENTER>
-
-</BODY>
-</HTML>