summaryrefslogtreecommitdiff
path: root/examples/APG/Misc_IPC
diff options
context:
space:
mode:
authornobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-07-31 16:14:11 +0000
committernobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-07-31 16:14:11 +0000
commit9c2ec3049a5634f1c916d792e81fc80edb669ea8 (patch)
tree0d634e179761581cadbffe852e7f9a9f049b5c6e /examples/APG/Misc_IPC
parent6540653cf736840d5aad719c73a8e43a549080be (diff)
downloadATCD-9c2ec3049a5634f1c916d792e81fc80edb669ea8.tar.gz
This commit was manufactured by cvs2svn to create tag 'TAO-1_4_2'.TAO-1_4_2
Diffstat (limited to 'examples/APG/Misc_IPC')
-rw-r--r--examples/APG/Misc_IPC/UDP_Broadcast.cpp34
-rw-r--r--examples/APG/Misc_IPC/UDP_Multicast.cpp37
-rw-r--r--examples/APG/Misc_IPC/UDP_Unicast.cpp71
-rw-r--r--examples/APG/Misc_IPC/misc_ipc.mpc23
-rw-r--r--examples/APG/Misc_IPC/misc_ipc.mwc6
5 files changed, 0 insertions, 171 deletions
diff --git a/examples/APG/Misc_IPC/UDP_Broadcast.cpp b/examples/APG/Misc_IPC/UDP_Broadcast.cpp
deleted file mode 100644
index 69e342b6f15..00000000000
--- a/examples/APG/Misc_IPC/UDP_Broadcast.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * $Id$
- *
- * Sample code from The ACE Programmer's Guide,
- * Copyright 2003 Addison-Wesley. All Rights Reserved.
- */
-
-// Listing 1 code/ch09
-#include "ace/OS_NS_string.h"
-#include "ace/Log_Msg.h"
-#include "ace/INET_Addr.h"
-#include "ace/SOCK_Dgram_Bcast.h"
-
-int send_broadcast (u_short to_port)
-{
- const char *message = "this is the message!\n";
- ACE_INET_Addr my_addr (ACE_static_cast (u_short, 10101));
- ACE_SOCK_Dgram_Bcast udp (my_addr);
- ssize_t sent = udp.send (message,
- ACE_OS::strlen (message) + 1,
- to_port);
- udp.close ();
- if (sent == -1)
- ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"),
- ACE_TEXT ("send")), -1);
- return 0;
-}
-// Listing 1
-
-int ACE_TMAIN (int, ACE_TCHAR *[])
-{
- send_broadcast (10);
- return 0;
-}
diff --git a/examples/APG/Misc_IPC/UDP_Multicast.cpp b/examples/APG/Misc_IPC/UDP_Multicast.cpp
deleted file mode 100644
index feb2baafc57..00000000000
--- a/examples/APG/Misc_IPC/UDP_Multicast.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * $Id$
- *
- * Sample code from The ACE Programmer's Guide,
- * Copyright 2003 Addison-Wesley. All Rights Reserved.
- */
-
-// Listing 1 code/ch09
-#include "ace/OS_NS_string.h"
-#include "ace/Log_Msg.h"
-#include "ace/INET_Addr.h"
-#include "ace/SOCK_Dgram_Mcast.h"
-
-int send_multicast (const ACE_INET_Addr &mcast_addr)
-{
- const char *message = "this is the message!\n";
- ACE_SOCK_Dgram_Mcast udp;
- if (-1 == udp.join (mcast_addr))
- ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"),
- ACE_TEXT ("join")), -1);
-
- ssize_t sent = udp.send (message,
- ACE_OS::strlen (message) + 1);
- udp.close ();
- if (sent == -1)
- ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"),
- ACE_TEXT ("send")), -1);
- return 0;
-}
-// Listing 1
-
-int ACE_TMAIN (int, ACE_TCHAR *[])
-{
- ACE_INET_Addr nop;
- send_multicast (nop);
- return 0;
-}
diff --git a/examples/APG/Misc_IPC/UDP_Unicast.cpp b/examples/APG/Misc_IPC/UDP_Unicast.cpp
deleted file mode 100644
index 909ff175978..00000000000
--- a/examples/APG/Misc_IPC/UDP_Unicast.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * $Id$
- *
- * Sample code from The ACE Programmer's Guide,
- * Copyright 2003 Addison-Wesley. All Rights Reserved.
- */
-
-// Listing 1 code/ch09
-#include "ace/OS_NS_string.h"
-#include "ace/Log_Msg.h"
-#include "ace/INET_Addr.h"
-#include "ace/SOCK_Dgram.h"
-
-int send_unicast (const ACE_INET_Addr &to)
-{
- const char *message = "this is the message!\n";
- ACE_INET_Addr my_addr (ACE_static_cast (u_short, 10101));
- ACE_SOCK_Dgram udp (my_addr);
- ssize_t sent = udp.send (message,
- ACE_OS::strlen (message) + 1,
- to);
- udp.close ();
- if (sent == -1)
- ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"),
- ACE_TEXT ("send")), -1);
- return 0;
-}
-// Listing 1
-
-// Listing 2 code/ch09
-void echo_dgram (void)
-{
- ACE_INET_Addr my_addr (ACE_static_cast (u_short, 10102));
- ACE_INET_Addr your_addr;
- ACE_SOCK_Dgram udp (my_addr);
- char buff[BUFSIZ];
- size_t buflen = sizeof (buff);
- ssize_t recv_cnt = udp.recv (buff, buflen, your_addr);
- if (recv_cnt > 0)
- udp.send (buff, ACE_static_cast (size_t, buflen), your_addr);
- udp.close ();
- return;
-}
-// Listing 2
-
-// Listing 3 code/ch09
-#include "ace/SOCK_CODgram.h"
-// Exclude 3
-static void show_codgram (void)
-{
- char buff[BUFSIZ];
- size_t buflen = sizeof (buff);
- // Exclude 3
- const ACE_TCHAR *peer = ACE_TEXT ("other_host:8042");
- ACE_INET_Addr peer_addr (peer);
- ACE_SOCK_CODgram udp;
- if (0 != udp.open (peer_addr))
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), peer));
-
- // ...
-
- if (-1 == udp.send (buff, buflen))
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("send")));
- // Listing 3
-}
-
-int ACE_TMAIN (int, ACE_TCHAR *[])
-{
- show_codgram ();
- return 0;
-}
diff --git a/examples/APG/Misc_IPC/misc_ipc.mpc b/examples/APG/Misc_IPC/misc_ipc.mpc
deleted file mode 100644
index d720f15999b..00000000000
--- a/examples/APG/Misc_IPC/misc_ipc.mpc
+++ /dev/null
@@ -1,23 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(UDP Broadcast) : aceexe {
- exename = UDP_Broadcast
- Source_Files {
- UDP_Broadcast.cpp
- }
-}
-
-project(UDP Multicast) : aceexe {
- exename = UDP_Multicast
- Source_Files {
- UDP_Multicast.cpp
- }
-}
-
-project(UDP Unicast) : aceexe {
- exename = UDP_Unicast
- Source_Files {
- UDP_Unicast.cpp
- }
-}
diff --git a/examples/APG/Misc_IPC/misc_ipc.mwc b/examples/APG/Misc_IPC/misc_ipc.mwc
deleted file mode 100644
index a6131dbb3bb..00000000000
--- a/examples/APG/Misc_IPC/misc_ipc.mwc
+++ /dev/null
@@ -1,6 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-workspace {
- misc_ipc.mpc
-}