summaryrefslogtreecommitdiff
path: root/examples/Logger/client
diff options
context:
space:
mode:
Diffstat (limited to 'examples/Logger/client')
-rw-r--r--examples/Logger/client/Makefile66
-rw-r--r--examples/Logger/client/logging_app.cpp53
2 files changed, 0 insertions, 119 deletions
diff --git a/examples/Logger/client/Makefile b/examples/Logger/client/Makefile
deleted file mode 100644
index fd4d0534480..00000000000
--- a/examples/Logger/client/Makefile
+++ /dev/null
@@ -1,66 +0,0 @@
-#----------------------------------------------------------------------------
-# @(#)Makefile 1.1 10/18/96
-#
-# Makefile for client logging applications
-#----------------------------------------------------------------------------
-
-#----------------------------------------------------------------------------
-# Local macros
-#----------------------------------------------------------------------------
-
-BIN = logging_app
-
-LSRC = $(addsuffix .cpp,$(BIN))
-
-VLDLIBS = $(LDLIBS:%=%$(VAR))
-
-BUILD = $(VBIN)
-
-#----------------------------------------------------------------------------
-# Include macros and targets
-#----------------------------------------------------------------------------
-
-include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU
-include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU
-include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU
-include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU
-include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU
-include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU
-
-#----------------------------------------------------------------------------
-# Local targets
-#----------------------------------------------------------------------------
-
-#----------------------------------------------------------------------------
-# Dependencies
-#----------------------------------------------------------------------------
-
-# DO NOT DELETE THIS LINE -- g++dep uses it.
-# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
-.obj/logging_app.o .shobj/logging_app.so: logging_app.cpp \
- $(WRAPPER_ROOT)/ace/SOCK_Connector.h \
- $(WRAPPER_ROOT)/ace/SOCK_Stream.h \
- $(WRAPPER_ROOT)/ace/SOCK_IO.h \
- $(WRAPPER_ROOT)/ace/SOCK.h \
- $(WRAPPER_ROOT)/ace/ACE.h \
- $(WRAPPER_ROOT)/ace/OS.h \
- $(WRAPPER_ROOT)/ace/config.h \
- $(WRAPPER_ROOT)/ace/stdcpp.h \
- $(WRAPPER_ROOT)/ace/Trace.h \
- $(WRAPPER_ROOT)/ace/Log_Msg.h \
- $(WRAPPER_ROOT)/ace/Log_Record.h \
- $(WRAPPER_ROOT)/ace/Log_Priority.h \
- $(WRAPPER_ROOT)/ace/Log_Record.i \
- $(WRAPPER_ROOT)/ace/ACE.i \
- $(WRAPPER_ROOT)/ace/Addr.h \
- $(WRAPPER_ROOT)/ace/IPC_SAP.h \
- $(WRAPPER_ROOT)/ace/IPC_SAP.i \
- $(WRAPPER_ROOT)/ace/SOCK.i \
- $(WRAPPER_ROOT)/ace/SOCK_IO.i \
- $(WRAPPER_ROOT)/ace/INET_Addr.h \
- $(WRAPPER_ROOT)/ace/SOCK_Stream.i \
- $(WRAPPER_ROOT)/ace/Time_Value.h \
- $(WRAPPER_ROOT)/ace/SOCK_Connector.i
-
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/examples/Logger/client/logging_app.cpp b/examples/Logger/client/logging_app.cpp
deleted file mode 100644
index 937bbe8341c..00000000000
--- a/examples/Logger/client/logging_app.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-// $Id$
-
-// This program sends logging records directly to the server, rather
-// than going through the client logging daemon.
-
-#include "ace/SOCK_Connector.h"
-
-#include "ace/Log_Record.h"
-
-static u_short LOGGER_PORT = ACE_DEFAULT_SERVER_PORT;
-static const char *const LOGGER_HOST = ACE_DEFAULT_SERVER_HOST;
-static const int MAX_ITERATIONS = 10;
-
-int
-main (int argc, char *argv[])
-{
- const char *logger_host = argc > 1 ? argv[1] : LOGGER_HOST;
- u_short logger_port = argc > 2 ? ACE_OS::atoi (argv[2]) : LOGGER_PORT;
- int max_iterations = argc > 3 ? ACE_OS::atoi (argv[3]) : MAX_ITERATIONS;
-
- ACE_SOCK_Stream logger;
- ACE_SOCK_Connector connector;
- ACE_INET_Addr addr (logger_port, logger_host);
-
- if (connector.connect (logger, addr) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), -1);
-
- for (int i = 0; i < max_iterations; i++)
- {
- ACE_Log_Record log_record (LM_DEBUG,
- ACE_OS::time ((time_t *) 0),
- ACE_OS::getpid ());
-
- char buf[BUFSIZ];
- ::sprintf (buf, "message = %d\n", i + 1);
- log_record.msg_data (buf);
- size_t len = log_record.length ();
- size_t encoded_len = htonl (len);
-
- log_record.encode ();
-
- if (logger.send (4, &encoded_len, sizeof encoded_len,
- (char *) &log_record, len) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "send"), -1);
- else
- ACE_OS::sleep (1);
- }
-
- if (logger.close () == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "close"), -1);
-
- return 0;
-}