diff options
author | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-06-17 18:02:38 +0000 |
---|---|---|
committer | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-06-17 18:02:38 +0000 |
commit | 93a16ac7e1ebc8bc27dfa8c9935bc67f32695dcd (patch) | |
tree | 30303859980a25cd409958839c50bca4d29f9d62 /performance-tests/TTCP | |
parent | 8cb9eb84ba62ec024c665399b991b1508f60a8a0 (diff) | |
download | ATCD-93a16ac7e1ebc8bc27dfa8c9935bc67f32695dcd.tar.gz |
*** empty log message ***
Diffstat (limited to 'performance-tests/TTCP')
-rw-r--r-- | performance-tests/TTCP/Orbix/How_to_run_tests | 59 | ||||
-rw-r--r-- | performance-tests/TTCP/Orbix/Makefile | 31 | ||||
-rw-r--r-- | performance-tests/TTCP/Orbix/README | 13 | ||||
-rw-r--r-- | performance-tests/TTCP/Orbix/orbix_defaults.mk | 85 | ||||
-rw-r--r-- | performance-tests/TTCP/Orbix/run_test | 30 | ||||
-rw-r--r-- | performance-tests/TTCP/Orbix/ttcp.hh | 376 | ||||
-rw-r--r-- | performance-tests/TTCP/Orbix/ttcp.idl | 24 | ||||
-rw-r--r-- | performance-tests/TTCP/Orbix/ttcpC.cpp | 343 | ||||
-rw-r--r-- | performance-tests/TTCP/Orbix/ttcpS.cpp | 159 | ||||
-rw-r--r-- | performance-tests/TTCP/Orbix/ttcp_i.cpp | 1010 | ||||
-rw-r--r-- | performance-tests/TTCP/Orbix/ttcp_i.h | 46 |
11 files changed, 0 insertions, 2176 deletions
diff --git a/performance-tests/TTCP/Orbix/How_to_run_tests b/performance-tests/TTCP/Orbix/How_to_run_tests deleted file mode 100644 index 8061c529dd2..00000000000 --- a/performance-tests/TTCP/Orbix/How_to_run_tests +++ /dev/null @@ -1,59 +0,0 @@ -// Orbix -// -// sequence AND string - -// HOSTNAMES: -// for our tests, enatm0-tango.cs.wustl.edu was the receiver hostname used for atm transfers -// tango.cs.wustl.edu was the receiver hostname used for ethernet transfers -// substitute the proper receiver hostname for your system. - -// ORBIX DAEMONS: -// there must be an orbix daemon running on the receiver host in your system. -// in our case, we had an orbix daemon running on tango.cs.wustl.edu - -// ACE_ROOT: -// ACE_ROOT can be set to the root directory of ACE so that these lines -// can be cut and pasted to run tests. - -// Results: -// These examples show the result files being stored in a /results directory off -// the current path. This can be set to whatever you like. - -// ****** sequence ****** - -// ATM with 64k receiver buffers -Receiver_Host: putit ttcp_sequence "$ACE_ROOT/apps/TTCP/Orbix/server -q -s -r -fm -b 65536" -Sender_Host: run_test 64 encip1-tango.cs.wustl.edu ./results/sequence.atm.64 -q - or: client -D -fm -s -t -l 1048576 -n 100 -h encip1-tango.cs.wustl.edu -L ./results/sequence.atm.64 -q - -// ATM with 8k reciever buffers -Receiver_Host: putit ttcp_sequence "$ACE_ROOT/apps/TTCP/Orbix/server -q -s -r -fm" -Sender_Host: run_test 64 encip1-tango.cs.wustl.edu ./results/sequence.atm.8 -q - -// ETHERNET with 64k receiver buffers -Receiver_Host: putit ttcp_sequence "$ACE_ROOT/apps/TTCP/Orbix/server -q -s -r -fm -b 65536" -Sender_Host: run_test 64 tango.cs.wustl.edu ./results/sequence.ethernet.64 -q - -// ETHERNET with 8k reciever buffers -Receiver_Host: putit ttcp_sequence "$ACE_ROOT/apps/TTCP/Orbix/server -q -s -r -fm" -Sender_Host: run_test 64 tango.cs.wustl.edu ./results/sequence.ethernet.8 -q - -// ****** string ****** - -// ATM with 64k receiver buffers -Receiver_Host: putit ttcp_string "$ACE_ROOT/apps/TTCP/Orbix/server -s -r -fm -b 65536" -Sender_Host: run_test 64 encip1-tango.cs.wustl.edu ./results/string.atm.64 - or: client -D -fm -s -t -l 1048576 -n 100 -h encip1-tango.cs.wustl.edu -L ./results/string.atm.64 - -// ATM with 8k reciever buffers -Receiver_Host: putit ttcp_string "$ACE_ROOT/apps/TTCP/Orbix/server -s -r -fm" -Sender_Host: run_test 64 encip1-tango.cs.wustl.edu ./results/string.atm.8 - -// ETHERNET with 64k receiver buffers -Receiver_Host: putit ttcp_string "$ACE_ROOT/apps/TTCP/Orbix/server -s -r -fm -b 65536" -Sender_Host: run_test 64 tango.cs.wustl.edu ./results/string.ethernet.64 - -// ETHERNET with 8k reciever buffers -Receiver_Host: putit ttcp_string "$ACE_ROOT/apps/TTCP/Orbix/server -s -r -fm" -Sender_Host: run_test 64 tango.cs.wustl.edu ./results/string.ethernet.8 - diff --git a/performance-tests/TTCP/Orbix/Makefile b/performance-tests/TTCP/Orbix/Makefile deleted file mode 100644 index c5a9eb901fa..00000000000 --- a/performance-tests/TTCP/Orbix/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -#---------------------------------------------------------------------------- -# $Id$ -#---------------------------------------------------------------------------- - -include ./orbix_defaults.mk - -all: client server - @echo - - @echo "\"client\" and \"server\" have been compiled." - @echo - @echo "To run tests, check the how_to_run_tests file." - @echo - -C++FLAGS += -DWANT_ORBIX_FDS -DLM_RESULTS -IDLFLAGS += -c C.cpp -s S.cpp -B -SERVER_OBJS = ttcpS.o ttcp_i.o -CLIENT_OBJS = ttcpC.o ttcp_i.o - -client: $(CLIENT_OBJS) - $(QUANTIFY) $(C++) $(C++FLAGS) -o client $(CLIENT_OBJS) -lITclt $(LDFLAGS) - -server: $(SERVER_OBJS) - $(QUANTIFY) $(C++) $(C++FLAGS) -o server $(SERVER_OBJS) -lITsrv $(LDFLAGS) - -clean: - rm -f core *.o *~ client server - -realclean: - rm -f core *.o *~ client server - diff --git a/performance-tests/TTCP/Orbix/README b/performance-tests/TTCP/Orbix/README deleted file mode 100644 index 6fd64c6fdec..00000000000 --- a/performance-tests/TTCP/Orbix/README +++ /dev/null @@ -1,13 +0,0 @@ -How to compile. - -1. Orbix must be installed. -2. You must set the following paths in ./orbix_defaults.mk -ORBIX_BINDIR = /the/path/to/Orbix/bin -ORBIX_LIBDIR = /the/path/to/Orbix/lib -ORBIX_INCDIR = /the/path/to/Orbix/include - - -How to run tests. -1. Orbix must be installed and proper Orbix environment variables - must be set. (ie. IT_CONFIG_PATH) -2. Read ./how_to_run_tests diff --git a/performance-tests/TTCP/Orbix/orbix_defaults.mk b/performance-tests/TTCP/Orbix/orbix_defaults.mk deleted file mode 100644 index 9a3e83f5fe3..00000000000 --- a/performance-tests/TTCP/Orbix/orbix_defaults.mk +++ /dev/null @@ -1,85 +0,0 @@ - -# These rules define default C++, C++FLAGS and C++SUFFIX. -# C++ is the C++ compiler to use; C++FLAGS are command-line -# flags to the C++ compiler for use in compiling C++ source -# files into objects; C++SUFFIX is the filename suffix -# indicating C++ source. By default, it's set to "C" for AT&T C++, -# and "cc" for GNU g++. - -# Feel free to override these in your Makefiles *after* -# including this file. - -# IMPORTANT: If the -M switch is specified in IDLFLAGS, the IDL -# compiler appends to the user-specified file. The dependency for -# specified_file.o in the linking target should appear _after_ any use -# of the IDL compiler which takes the -M flag. Putting it _last_ -# is normally the best approach. - -# Note that these rule definitions use pattern matching, -# and therefore only work with SunOS make and GNU make. - -# They may not work with other vendor's versions of make. -# If they do not, you may wish to try using GNU make, which -# is free software produced by the Free Software Foundation. - -# If the version of make you wish to use does not support -# pattern matching, use the sample explicit rule set in -# the comments at the end of this file. - -# ------------------------------------------------------------ -# Essential: set these to the locations into which you -# have installed Orbix' components: - -ORBIX_BINDIR = $(ORBIX_ROOT)/bin -ORBIX_LIBDIR = $(ORBIX_ROOT)/lib -ORBIX_INCDIR = $(ORBIX_ROOT)/include - -C++ = CC -C++FLAGS = -I$(ORBIX_INCDIR) -C++SUFFIX = cpp - -LDFLAGS = -L$(ORBIX_LIBDIR) -R $(ORBIX_LIBDIR) -lnsl -lsocket - -IDL = $(ORBIX_BINDIR)/idl - -IDLFLAGS = - - -# ------------------------------------------------------------ -# The following section defines implicit rules for creating -# *.{client,server}.C files, rules for compiling those -# into objects, and even a rule for compiling C++ source into -# objects (in case one isn't already defined). - -# ------------------------------------------------------------ -# first, put the new suffixes at the *head* of the suffix list, -# overriding any existing .C compilation method. -.SUFFIXES: -.SUFFIXES: .$(C++SUFFIX) .idl $(SUFFIXES) - -# .SUFFIXES: .$(C++SUFFIX) .idl .hh $(SUFFIXES) -# ------------------------------------------------------------ -# *[CS].o must be compiled here, and depends -# mostly on the C++ files produced from the IDL file. - -%C.o: %C.$(C++SUFFIX) - $(C++) -c $(C++FLAGS) $< - -%S.o: %S.$(C++SUFFIX) - $(C++) -c $(C++FLAGS) $< - -%.o: %.$(C++SUFFIX) - $(C++) -c $(C++FLAGS) $< - -# and here's how to compile C++ files from the IDL file. -# only ONE of these rules will be run at make-time, - -%S.$(C++SUFFIX): %.idl - $(IDL) $(IDLFLAGS) $< - -%C.$(C++SUFFIX): %.idl - $(IDL) $(IDLFLAGS) $< - -%.hh: %.idl - $(IDL) $(IDLFLAGS) $< - diff --git a/performance-tests/TTCP/Orbix/run_test b/performance-tests/TTCP/Orbix/run_test deleted file mode 100644 index 842be36c4ac..00000000000 --- a/performance-tests/TTCP/Orbix/run_test +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/csh -f -if ($#argv < 3) then - echo "Usage: sclt <Max msg size> <destination> <TitleOfThisTest> -q" - exit 1 -endif -# -@ msize=1024 -@ limit= ($argv[1] * 1024) -#echo $limit -#echo $msize -echo "Iteration#" 1 ": client -D -fm -s -t -l" $msize "-h" $2 "-L" $3 $4 -client -D -fm -s -t -l $msize -h $2 -x -L $3 $4 -set flag=0 -while ($msize <= $limit) - if ($flag == 0) goto label - echo "Iteration#" 1 ": client -D -fm -s -t -l" $msize "-h" $2 "-x -L" $3 $4 - client -D -fm -s -t -l $msize -h $2 -x -L $3 $4 - label: - set flag=1 - foreach i (2 3 4 5) - echo "Iteration#" $i ": client -D -fm -s -t -l" $msize "-h" $2 "-x -L " $3 $4 - client -D -fm -s -t -l $msize -h $2 -L $3 $4 - end - echo "---------------------------" - @ msize = ($msize * 2) -end - -echo " " -echo "Done at:" -date diff --git a/performance-tests/TTCP/Orbix/ttcp.hh b/performance-tests/TTCP/Orbix/ttcp.hh deleted file mode 100644 index ff24bfe58ec..00000000000 --- a/performance-tests/TTCP/Orbix/ttcp.hh +++ /dev/null @@ -1,376 +0,0 @@ - -#ifndef ttcp_hh -#define ttcp_hh - -#include <CORBA.h> - -#include <string.h> - - -#ifndef _IDL_SEQUENCE_char_defined -#define _IDL_SEQUENCE_char_defined - -struct IONANC__IDL_SEQUENCE_char; -struct _IDL_SEQUENCE_char { - unsigned long _maximum; - unsigned long _length; - char *_buffer; - - operator IONANC__IDL_SEQUENCE_char(); - operator const IONANC__IDL_SEQUENCE_char() const; - _IDL_SEQUENCE_char& operator= (const IONANC__IDL_SEQUENCE_char&); - - _IDL_SEQUENCE_char& operator= (const _IDL_SEQUENCE_char&); - _IDL_SEQUENCE_char (const _IDL_SEQUENCE_char&); - - _IDL_SEQUENCE_char (unsigned long IT_size = 0); - - ~_IDL_SEQUENCE_char () { if (_buffer) delete [] _buffer; } - - char& operator [] (unsigned long IT_i) const {return _buffer[IT_i]; } - - void encodeOp (CORBA::Request &IT_r) const; - void decodeOp (CORBA::Request &IT_r); - void decodeInOutOp (CORBA::Request &IT_r); -}; - -struct IONANC__IDL_SEQUENCE_char { - unsigned long _maximum; - unsigned long _length; - char *_buffer; - - char& operator [] (unsigned long IT_i) const; - - operator _IDL_SEQUENCE_char (); - - operator const _IDL_SEQUENCE_char () const; - -}; - - - -#endif - - -#ifndef _ttcp_sequence_defined -#define _ttcp_sequence_defined -class ttcp_sequence_dispatch : public virtual CORBA::PPTR { -public: - - ttcp_sequence_dispatch (void *IT_p, CORBA::Object* IT_o, const char *IT_m, - CORBA::LoaderClass *IT_l, char *IT_i, void* IT_im) - : CORBA::PPTR (IT_p,IT_o,IT_m,IT_l,IT_i,IT_im) {} - - - ttcp_sequence_dispatch (char *IT_OR, void *IT_p, CORBA::Object *IT_o) - : CORBA::PPTR (IT_OR,IT_p,IT_o) {} - - - ttcp_sequence_dispatch () {} - - ttcp_sequence_dispatch (void *IT_p, CORBA::Object *IT_o, const char *IT_m, - char *IT_i, CORBA::Object* IT_ob, void* IT_im) - : CORBA::PPTR (IT_p,IT_o,IT_m,IT_i,IT_ob,IT_im) {} - - - virtual unsigned char dispatch (CORBA::Request &IT_r, - unsigned char IT_isTarget, void* IT_pp=NULL); - - -}; - -class ttcp_sequence; - - -#ifndef ttcp_sequenceForwH -#define ttcp_sequenceForwH -CORBA::ObjectRef ttcp_sequence_getBase (void *); -void ttcp_sequence_release (void *, CORBA::Environment &IT_env=CORBA::default_environment); -ttcp_sequence* ttcp_sequence_duplicate (void *, CORBA::Environment &IT_env=CORBA::default_environment); -#endif -#define ttcp_sequence_IMPL "ttcp_sequence" - - -class ttcp_sequence; -#define ttcp_sequence_IR "ttcp_sequence" -#define ttcp_sequence_IMPL "ttcp_sequence" - -typedef ttcp_sequence* ttcp_sequenceRef; -typedef ttcp_sequence* ttcp_sequence_ptr; -class ttcp_sequence: public virtual CORBA::Object { -public: - ttcp_sequence (char *IT_OR); - ttcp_sequence () : CORBA::Object (1) {} - ttcp_sequence* _duplicate( - CORBA::Environment &IT_env=CORBA::default_environment) { - CORBA::Object::_duplicate (IT_env); return this; } - static ttcp_sequence* _bind (const char* IT_markerServer, const char* host, - const CORBA::Context &IT_c, - CORBA::Environment &IT_env=CORBA::default_environment); - static ttcp_sequence* _bind (CORBA::Environment &IT_env); - static ttcp_sequence* _bind (const char* IT_markerServer=NULL, const char* host=NULL, - CORBA::Environment &IT_env=CORBA::default_environment); - static ttcp_sequence* _narrow (CORBA::Object* , CORBA::Environment &IT_env=CORBA::default_environment); -typedef _IDL_SEQUENCE_char my_sequence; - virtual long send (const ttcp_sequence::my_sequence& ttcp_seq, CORBA::Environment &IT_env=CORBA::default_environment); - virtual void start_timer (CORBA::Environment &IT_env=CORBA::default_environment); - virtual void stop_timer (CORBA::Environment &IT_env=CORBA::default_environment); -}; - - -#define TIE_ttcp_sequence(X) ttcp_sequence##X - -#define DEF_TIE_ttcp_sequence(X) \ - class ttcp_sequence##X : public virtual ttcp_sequence { \ - X* m_obj; \ - public: \ - \ - ttcp_sequence##X (X *objp, const char* m="", CORBA::LoaderClass *l=nil)\ - : ttcp_sequence(), CORBA::Object (), m_obj(objp) { \ - m_pptr = new ttcp_sequence_dispatch \ - (( ttcp_sequence*)this,(CORBA::Object*)this,m,l,ttcp_sequence_IR,m_obj); \ - } \ - ttcp_sequence##X (CORBA::Object *IT_p, const char* IT_m="", void *IT_q=nil)\ - : ttcp_sequence(), CORBA::Object () { \ - m_pptr = new ttcp_sequence_dispatch \ - (( ttcp_sequence*)this,(CORBA::Object*)this,IT_m,ttcp_sequence_IR,IT_p,IT_q); \ - m_obj = (X*)(m_pptr->getImplObj ()); \ - } \ - \ - virtual ~ttcp_sequence##X () { \ - if (_okToDeleteImpl ()) delete m_obj; } \ - \ - virtual void* _deref () { \ - return m_obj; } \ - \ - virtual long send (const ttcp_sequence::my_sequence& ttcp_seq, CORBA::Environment &IT_env) {\ -return m_obj->send ( ttcp_seq,IT_env);\ -}\ - \ - virtual void start_timer (CORBA::Environment &IT_env) {\ -m_obj->start_timer (IT_env);\ -}\ - \ - virtual void stop_timer (CORBA::Environment &IT_env) {\ -m_obj->stop_timer (IT_env);\ -}\ - \ - }; - - -#define QUALS_ttcp_sequence \ - virtual long send (const ttcp_sequence::my_sequence& ttcp_seq, CORBA::Environment &IT_env) {\ -return m_obj->send ( ttcp_seq,IT_env);\ -}\ - \ - virtual void start_timer (CORBA::Environment &IT_env) {\ -m_obj->start_timer (IT_env);\ -}\ - \ - virtual void stop_timer (CORBA::Environment &IT_env) {\ -m_obj->stop_timer (IT_env);\ -}\ - - - - -class ttcp_sequenceProxyFactoryClass : public virtual CORBA::ObjectFactoryClass { -public: - ttcp_sequenceProxyFactoryClass (unsigned char IT_p=0) - : CORBA::ProxyFactory (ttcp_sequence_IR, IT_p) {} - - virtual void* New (char *IT_OR, CORBA::Environment&); - - virtual void* New2 (); - - virtual void* IT_castUp (void *IT_p, char* IT_s); - - virtual CORBA::PPTR* pptr (void *IT_p); - - virtual void baseInterfaces (_IDL_SEQUENCE_string&); - - -}; - -extern ttcp_sequenceProxyFactoryClass ttcp_sequenceProxyFactory; - - - -class ttcp_sequenceBOAImpl : public virtual ttcp_sequence { -public: - ttcp_sequenceBOAImpl (const char *m="", CORBA::LoaderClass *l=NULL) { - if (CORBA::PPTR::isOK (m_pptr, ttcp_sequence_IR)) - m_pptr = new ttcp_sequence_dispatch ( (ttcp_sequence*)this, - (CORBA::Object*)this, m, l, ttcp_sequence_IR, this); -} - - virtual long send (const ttcp_sequence::my_sequence& ttcp_seq, CORBA::Environment &IT_env=CORBA::default_environment) =0; - virtual void start_timer (CORBA::Environment &IT_env=CORBA::default_environment) =0; - virtual void stop_timer (CORBA::Environment &IT_env=CORBA::default_environment) =0; -}; - - -#endif - - -#ifndef _ttcp_string_defined -#define _ttcp_string_defined -class ttcp_string_dispatch : public virtual CORBA::PPTR { -public: - - ttcp_string_dispatch (void *IT_p, CORBA::Object* IT_o, const char *IT_m, - CORBA::LoaderClass *IT_l, char *IT_i, void* IT_im) - : CORBA::PPTR (IT_p,IT_o,IT_m,IT_l,IT_i,IT_im) {} - - - ttcp_string_dispatch (char *IT_OR, void *IT_p, CORBA::Object *IT_o) - : CORBA::PPTR (IT_OR,IT_p,IT_o) {} - - - ttcp_string_dispatch () {} - - ttcp_string_dispatch (void *IT_p, CORBA::Object *IT_o, const char *IT_m, - char *IT_i, CORBA::Object* IT_ob, void* IT_im) - : CORBA::PPTR (IT_p,IT_o,IT_m,IT_i,IT_ob,IT_im) {} - - - virtual unsigned char dispatch (CORBA::Request &IT_r, - unsigned char IT_isTarget, void* IT_pp=NULL); - - -}; - -class ttcp_string; - - -#ifndef ttcp_stringForwH -#define ttcp_stringForwH -CORBA::ObjectRef ttcp_string_getBase (void *); -void ttcp_string_release (void *, CORBA::Environment &IT_env=CORBA::default_environment); -ttcp_string* ttcp_string_duplicate (void *, CORBA::Environment &IT_env=CORBA::default_environment); -#endif -#define ttcp_string_IMPL "ttcp_string" - - -class ttcp_string; -#define ttcp_string_IR "ttcp_string" -#define ttcp_string_IMPL "ttcp_string" - -typedef ttcp_string* ttcp_stringRef; -typedef ttcp_string* ttcp_string_ptr; -class ttcp_string: public virtual CORBA::Object { -public: - ttcp_string (char *IT_OR); - ttcp_string () : CORBA::Object (1) {} - ttcp_string* _duplicate( - CORBA::Environment &IT_env=CORBA::default_environment) { - CORBA::Object::_duplicate (IT_env); return this; } - static ttcp_string* _bind (const char* IT_markerServer, const char* host, - const CORBA::Context &IT_c, - CORBA::Environment &IT_env=CORBA::default_environment); - static ttcp_string* _bind (CORBA::Environment &IT_env); - static ttcp_string* _bind (const char* IT_markerServer=NULL, const char* host=NULL, - CORBA::Environment &IT_env=CORBA::default_environment); - static ttcp_string* _narrow (CORBA::Object* , CORBA::Environment &IT_env=CORBA::default_environment); - virtual long send (const char * ttcp_str, CORBA::Environment &IT_env=CORBA::default_environment); - virtual void start_timer (CORBA::Environment &IT_env=CORBA::default_environment); - virtual void stop_timer (CORBA::Environment &IT_env=CORBA::default_environment); -}; - - -#define TIE_ttcp_string(X) ttcp_string##X - -#define DEF_TIE_ttcp_string(X) \ - class ttcp_string##X : public virtual ttcp_string { \ - X* m_obj; \ - public: \ - \ - ttcp_string##X (X *objp, const char* m="", CORBA::LoaderClass *l=nil)\ - : ttcp_string(), CORBA::Object (), m_obj(objp) { \ - m_pptr = new ttcp_string_dispatch \ - (( ttcp_string*)this,(CORBA::Object*)this,m,l,ttcp_string_IR,m_obj); \ - } \ - ttcp_string##X (CORBA::Object *IT_p, const char* IT_m="", void *IT_q=nil)\ - : ttcp_string(), CORBA::Object () { \ - m_pptr = new ttcp_string_dispatch \ - (( ttcp_string*)this,(CORBA::Object*)this,IT_m,ttcp_string_IR,IT_p,IT_q); \ - m_obj = (X*)(m_pptr->getImplObj ()); \ - } \ - \ - virtual ~ttcp_string##X () { \ - if (_okToDeleteImpl ()) delete m_obj; } \ - \ - virtual void* _deref () { \ - return m_obj; } \ - \ - virtual long send (const char * ttcp_str, CORBA::Environment &IT_env) {\ -return m_obj->send ( ttcp_str,IT_env);\ -}\ - \ - virtual void start_timer (CORBA::Environment &IT_env) {\ -m_obj->start_timer (IT_env);\ -}\ - \ - virtual void stop_timer (CORBA::Environment &IT_env) {\ -m_obj->stop_timer (IT_env);\ -}\ - \ - }; - - -#define QUALS_ttcp_string \ - virtual long send (const char * ttcp_str, CORBA::Environment &IT_env) {\ -return m_obj->send ( ttcp_str,IT_env);\ -}\ - \ - virtual void start_timer (CORBA::Environment &IT_env) {\ -m_obj->start_timer (IT_env);\ -}\ - \ - virtual void stop_timer (CORBA::Environment &IT_env) {\ -m_obj->stop_timer (IT_env);\ -}\ - - - - -class ttcp_stringProxyFactoryClass : public virtual CORBA::ObjectFactoryClass { -public: - ttcp_stringProxyFactoryClass (unsigned char IT_p=0) - : CORBA::ProxyFactory (ttcp_string_IR, IT_p) {} - - virtual void* New (char *IT_OR, CORBA::Environment&); - - virtual void* New2 (); - - virtual void* IT_castUp (void *IT_p, char* IT_s); - - virtual CORBA::PPTR* pptr (void *IT_p); - - virtual void baseInterfaces (_IDL_SEQUENCE_string&); - - -}; - -extern ttcp_stringProxyFactoryClass ttcp_stringProxyFactory; - - - -class ttcp_stringBOAImpl : public virtual ttcp_string { -public: - ttcp_stringBOAImpl (const char *m="", CORBA::LoaderClass *l=NULL) { - if (CORBA::PPTR::isOK (m_pptr, ttcp_string_IR)) - m_pptr = new ttcp_string_dispatch ( (ttcp_string*)this, - (CORBA::Object*)this, m, l, ttcp_string_IR, this); -} - - virtual long send (const char * ttcp_str, CORBA::Environment &IT_env=CORBA::default_environment) =0; - virtual void start_timer (CORBA::Environment &IT_env=CORBA::default_environment) =0; - virtual void stop_timer (CORBA::Environment &IT_env=CORBA::default_environment) =0; -}; - - -#endif - - -#endif diff --git a/performance-tests/TTCP/Orbix/ttcp.idl b/performance-tests/TTCP/Orbix/ttcp.idl deleted file mode 100644 index 6d4e901bc6f..00000000000 --- a/performance-tests/TTCP/Orbix/ttcp.idl +++ /dev/null @@ -1,24 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// @(#)ttcp.idl 1.1 10/18/96 - - -interface ttcp_sequence -{ - typedef sequence<char> my_sequence; - - long send (in my_sequence ttcp_seq); - oneway void start_timer (); - oneway void stop_timer (); -}; - -interface ttcp_string -{ - long send (in string ttcp_str); - oneway void start_timer (); - oneway void stop_timer (); -}; - - - diff --git a/performance-tests/TTCP/Orbix/ttcpC.cpp b/performance-tests/TTCP/Orbix/ttcpC.cpp deleted file mode 100644 index 325e3790285..00000000000 --- a/performance-tests/TTCP/Orbix/ttcpC.cpp +++ /dev/null @@ -1,343 +0,0 @@ -// $Id$ - -#include "ttcp.hh" - -ACE_RCSID(Orbix, ttcpC, "$Id$") - -#ifndef _IDL_SEQUENCE_char_Ops -#define _IDL_SEQUENCE_char_Ops - -_IDL_SEQUENCE_char &_IDL_SEQUENCE_char:: operator= (const IONANC__IDL_SEQUENCE_char& IT_p) { - this->operator= (*(_IDL_SEQUENCE_char*) &IT_p); - return (*this); -} - -_IDL_SEQUENCE_char:: operator IONANC__IDL_SEQUENCE_char () { - IONANC__IDL_SEQUENCE_char tmp; - memset (&tmp, 0, sizeof(tmp)); - ((_IDL_SEQUENCE_char *) &tmp)->operator= (*this); - return tmp; -} - -_IDL_SEQUENCE_char:: operator const IONANC__IDL_SEQUENCE_char () const { - IONANC__IDL_SEQUENCE_char tmp; - memset (&tmp, 0, sizeof(tmp)); - ((_IDL_SEQUENCE_char *) &tmp)->operator= (*this); - return tmp; -} - -_IDL_SEQUENCE_char& _IDL_SEQUENCE_char:: operator= (const _IDL_SEQUENCE_char &IT_s){ - if (this == &IT_s) return *this; - if (_buffer) delete [] _buffer; - _length = IT_s._length; - _maximum = IT_s._maximum; - if (_maximum) { - _buffer = new char [ _maximum ]; - for (unsigned long IT_j=0; IT_j < _length; IT_j++) - _buffer [IT_j] = IT_s._buffer[IT_j]; - } - else - _buffer = NULL; - return *this; -} - -_IDL_SEQUENCE_char:: _IDL_SEQUENCE_char (unsigned long IT_size) { - if (IT_size) - _buffer = new char [ IT_size ]; - else - _buffer = NULL; - _length = 0; - _maximum = IT_size; - } - -_IDL_SEQUENCE_char:: _IDL_SEQUENCE_char (const _IDL_SEQUENCE_char &IT_s) { - _length = IT_s._length; - _maximum = IT_s._maximum; - if (_maximum) { - _buffer = new char [ _maximum ]; - for (unsigned long IT_j=0; IT_j < _length; IT_j++) - _buffer [IT_j] = IT_s._buffer[IT_j]; - } - else - _buffer = NULL; -} - -void _IDL_SEQUENCE_char:: decodeInOutOp (CORBA::Request &IT_r) { - unsigned long IT_max; - IT_r >> IT_max; - if (IT_max > _maximum) - IT_r.makeRuntimeException3 (); - else { - IT_r >> _length; - if (_length > _maximum) - IT_r.makeRuntimeException4 (); - else - if (_maximum) { - char* IT_arr = (char*) _buffer; - IT_r.decodeCharArray (IT_arr, _length); - } - } -} - -void _IDL_SEQUENCE_char:: encodeOp (CORBA::Request &IT_r) const { - IT_r << _maximum; - IT_r << _length; -if (_maximum) { - char* IT_arr = (char*) _buffer; - IT_r.encodeCharArray (IT_arr, _length); -} -} - -void _IDL_SEQUENCE_char:: decodeOp (CORBA::Request &IT_r) { - IT_r >> _maximum; - IT_r >> _length; - if (_maximum) { - _buffer = new char [ _maximum ]; - { - char* IT_arr = (char*) _buffer; - IT_r.decodeCharArray (IT_arr, _length); - } - } - else - _buffer = NULL; -} - -char &IONANC__IDL_SEQUENCE_char:: operator [](unsigned long IT_i) const { - return _buffer[IT_i]; -} - -IONANC__IDL_SEQUENCE_char:: operator _IDL_SEQUENCE_char () { - return (*((_IDL_SEQUENCE_char *) this)); -} - -IONANC__IDL_SEQUENCE_char:: operator const _IDL_SEQUENCE_char () const { - return (*((const _IDL_SEQUENCE_char *) this)); -} - - -#endif - -ttcp_sequence::ttcp_sequence (char *IT_OR) { - m_pptr = new ttcp_sequence_dispatch (IT_OR, this,(CORBA::Object*)this); -} - -#ifndef ttcp_sequenceForwC -#define ttcp_sequenceForwC -CORBA::ObjectRef ttcp_sequence_getBase(void *IT_p){ - return (ttcp_sequence*)IT_p;} - -void ttcp_sequence_release (void *IT_p, CORBA::Environment &IT_env) { - ((ttcp_sequence*)IT_p)->_release(IT_env);} - -ttcp_sequence* ttcp_sequence_duplicate (void *IT_p, CORBA::Environment &IT_env) { - return ((ttcp_sequence*)IT_p)->_duplicate(IT_env); } -#endif - - - -ttcp_sequence* ttcp_sequence:: _bind (const char* IT_markerServer, const char* host, - const CORBA::Context &IT_c, - CORBA::Environment &IT_env) { - ttcp_sequence*IT_p = - (ttcp_sequence*)CORBA::Factory.New (IT_markerServer, IT_env, IT_c, host, - ttcp_sequence_IMPL, ttcp_sequence_IR); - return IT_p ? IT_p->_duplicate () : NULL; } - - - -ttcp_sequence* ttcp_sequence:: _bind (CORBA::Environment &IT_env) { - return _bind (NULL,NULL,CORBA::Context(), IT_env); } - - -ttcp_sequence* ttcp_sequence:: _bind (const char* IT_markerServer, const char* host, - CORBA::Environment &IT_env) { - return _bind (IT_markerServer, host, CORBA::Context (), IT_env); } -ttcp_sequence* ttcp_sequence::_narrow (CORBA::Object* IT_obj, CORBA::Environment &IT_env) { - ttcp_sequence* IT_p = (ttcp_sequence*)CORBA::Object::_castDown (IT_obj, ttcp_sequence_IR, IT_env); - return IT_p ? IT_p->_duplicate(IT_env) : NULL; - } - -void* ttcp_sequenceProxyFactoryClass::New (char *IT_OR, CORBA::Environment&) { - return new ttcp_sequence(IT_OR);} - -void* ttcp_sequenceProxyFactoryClass::New2 () { - return new ttcp_sequence();} - -void* ttcp_sequenceProxyFactoryClass::IT_castUp (void *IT_p, char* IT_s) { - void *IT_l; - if (!CORBA::_interfaceCmp (IT_s,ttcp_sequence_IR)) - return IT_p; - else if (IT_l=CORBA::ObjectFactoryClass::IT_castUp((CORBA::Object*)((ttcp_sequence*)IT_p),IT_s)) - return IT_l; - else return NULL; - } - - -CORBA::PPTR* ttcp_sequenceProxyFactoryClass::pptr (void *IT_p) { - return ((ttcp_sequence*)IT_p)->_pptr ();} - -void ttcp_sequenceProxyFactoryClass::baseInterfaces (_IDL_SEQUENCE_string& seq) { - add (seq, ttcp_sequence_IR); - CORBA::ObjectFactoryClass::baseInterfaces (seq); -} - -long ttcp_sequence:: send(const ttcp_sequence::my_sequence& ttcp_seq, CORBA::Environment &IT_env) { - - if (IT_env || m_isNull) return 0; - CORBA::Request IT_r (this, "send",IT_env,1,0); - if (!IT_r.isException (IT_env)) { - ttcp_seq.encodeOp (IT_r); - } - - IT_r.invoke (CORBA::Flags(0),IT_env); - if (!IT_r.isException (IT_env)) { - long IT_result; - IT_r >> IT_result; - IT_r.checkEnv (IT_env); - return IT_result; - } - return 0; -} - -void ttcp_sequence:: start_timer(CORBA::Environment &IT_env) { - - if (IT_env || m_isNull) return ; - CORBA::Request IT_r (this, "start_timer",IT_env,1,1); - - IT_r.invoke (CORBA::Flags(CORBA::INV_NO_RESPONSE), IT_env); -} - -void ttcp_sequence:: stop_timer(CORBA::Environment &IT_env) { - - if (IT_env || m_isNull) return ; - CORBA::Request IT_r (this, "stop_timer",IT_env,1,1); - - IT_r.invoke (CORBA::Flags(CORBA::INV_NO_RESPONSE), IT_env); -} - - -ttcp_sequenceProxyFactoryClass ttcp_sequenceProxyFactory(1); - - -#ifndef ttcp_sequence_dispatch_impl - -unsigned char ttcp_sequence_dispatch::dispatch (CORBA::Request &IT_r, - unsigned char, void *) { - IT_r.makeRuntimeException1 ("ttcp_sequence"); - return 0; -} - -#endif - -ttcp_string::ttcp_string (char *IT_OR) { - m_pptr = new ttcp_string_dispatch (IT_OR, this,(CORBA::Object*)this); -} - -#ifndef ttcp_stringForwC -#define ttcp_stringForwC -CORBA::ObjectRef ttcp_string_getBase(void *IT_p){ - return (ttcp_string*)IT_p;} - -void ttcp_string_release (void *IT_p, CORBA::Environment &IT_env) { - ((ttcp_string*)IT_p)->_release(IT_env);} - -ttcp_string* ttcp_string_duplicate (void *IT_p, CORBA::Environment &IT_env) { - return ((ttcp_string*)IT_p)->_duplicate(IT_env); } -#endif - - - -ttcp_string* ttcp_string:: _bind (const char* IT_markerServer, const char* host, - const CORBA::Context &IT_c, - CORBA::Environment &IT_env) { - ttcp_string*IT_p = - (ttcp_string*)CORBA::Factory.New (IT_markerServer, IT_env, IT_c, host, - ttcp_string_IMPL, ttcp_string_IR); - return IT_p ? IT_p->_duplicate () : NULL; } - - - -ttcp_string* ttcp_string:: _bind (CORBA::Environment &IT_env) { - return _bind (NULL,NULL,CORBA::Context(), IT_env); } - - -ttcp_string* ttcp_string:: _bind (const char* IT_markerServer, const char* host, - CORBA::Environment &IT_env) { - return _bind (IT_markerServer, host, CORBA::Context (), IT_env); } -ttcp_string* ttcp_string::_narrow (CORBA::Object* IT_obj, CORBA::Environment &IT_env) { - ttcp_string* IT_p = (ttcp_string*)CORBA::Object::_castDown (IT_obj, ttcp_string_IR, IT_env); - return IT_p ? IT_p->_duplicate(IT_env) : NULL; - } - -void* ttcp_stringProxyFactoryClass::New (char *IT_OR, CORBA::Environment&) { - return new ttcp_string(IT_OR);} - -void* ttcp_stringProxyFactoryClass::New2 () { - return new ttcp_string();} - -void* ttcp_stringProxyFactoryClass::IT_castUp (void *IT_p, char* IT_s) { - void *IT_l; - if (!CORBA::_interfaceCmp (IT_s,ttcp_string_IR)) - return IT_p; - else if (IT_l=CORBA::ObjectFactoryClass::IT_castUp((CORBA::Object*)((ttcp_string*)IT_p),IT_s)) - return IT_l; - else return NULL; - } - - -CORBA::PPTR* ttcp_stringProxyFactoryClass::pptr (void *IT_p) { - return ((ttcp_string*)IT_p)->_pptr ();} - -void ttcp_stringProxyFactoryClass::baseInterfaces (_IDL_SEQUENCE_string& seq) { - add (seq, ttcp_string_IR); - CORBA::ObjectFactoryClass::baseInterfaces (seq); -} - -long ttcp_string:: send(const char * ttcp_str, CORBA::Environment &IT_env) { - - if (IT_env || m_isNull) return 0; - CORBA::Request IT_r (this, "send",IT_env,1,0); - if (!IT_r.isException (IT_env)) { - IT_r.encodeStringOp (ttcp_str); - } - - IT_r.invoke (CORBA::Flags(0),IT_env); - if (!IT_r.isException (IT_env)) { - long IT_result; - IT_r >> IT_result; - IT_r.checkEnv (IT_env); - return IT_result; - } - return 0; -} - -void ttcp_string:: start_timer(CORBA::Environment &IT_env) { - - if (IT_env || m_isNull) return ; - CORBA::Request IT_r (this, "start_timer",IT_env,1,1); - - IT_r.invoke (CORBA::Flags(CORBA::INV_NO_RESPONSE), IT_env); -} - -void ttcp_string:: stop_timer(CORBA::Environment &IT_env) { - - if (IT_env || m_isNull) return ; - CORBA::Request IT_r (this, "stop_timer",IT_env,1,1); - - IT_r.invoke (CORBA::Flags(CORBA::INV_NO_RESPONSE), IT_env); -} - - -ttcp_stringProxyFactoryClass ttcp_stringProxyFactory(1); - - -#ifndef ttcp_string_dispatch_impl - -unsigned char ttcp_string_dispatch::dispatch (CORBA::Request &IT_r, - unsigned char, void *) { - IT_r.makeRuntimeException1 ("ttcp_string"); - return 0; -} - -#endif - diff --git a/performance-tests/TTCP/Orbix/ttcpS.cpp b/performance-tests/TTCP/Orbix/ttcpS.cpp deleted file mode 100644 index 1f9f6e742bd..00000000000 --- a/performance-tests/TTCP/Orbix/ttcpS.cpp +++ /dev/null @@ -1,159 +0,0 @@ -// $Id$ - -#include "ttcp.hh" - -ACE_RCSID(Orbix, ttcpS, "$Id$") - -#define ttcp_sequence_dispatch_impl - -unsigned char ttcp_sequence_dispatch::dispatch (CORBA::Request &IT_r, - unsigned char IT_isTarget, void *IT_pp) { - if (!IT_pp) - IT_pp = m_obj; - const char *IT_s = IT_r.getOperation (); - if (!strcmp(IT_s,"send")) { - long IT_result; - CORBA::Environment IT_env (IT_r); - CORBA::Filter* IT_f = CORBA::Orbix.getFilter (); - if (!IT_r.tcAssert ("\ -Ro~send~+ttcp_seq{S{c},0},>{l},N{}\ -")) - return 1; - ttcp_sequence::my_sequence ttcp_seq; - ttcp_seq.decodeOp (IT_r); - - if (IT_f && !IT_r.isException (IT_env)) - IT_f->inRequestPostM (IT_r, IT_env); - if (!IT_r.isException (IT_env)) - IT_result = ((ttcp_sequence*)IT_pp)->send ( ttcp_seq, IT_env); - - - if (!IT_r.isException (IT_env)) { - if (!IT_r.convertToReply ("\ -l\ -", IT_env)) return 1; - IT_r << IT_result; - } - - else IT_r.makeSystemException (IT_env); - return 1; - } - - else if (!strcmp(IT_s,"start_timer")) { - CORBA::Environment IT_env (IT_r); - CORBA::Filter* IT_f = CORBA::Orbix.getFilter (); - if (!IT_r.tcAssert ("\ -Ro~start_timer~>{v},O{}\ -")) - return 1; - - if (IT_f && !IT_r.isException (IT_env)) - IT_f->inRequestPostM (IT_r, IT_env); - if (!IT_r.isException (IT_env)) - ((ttcp_sequence*)IT_pp)->start_timer (IT_env); - - IT_r.replyNoResults (CORBA::Flags(CORBA::INV_NO_RESPONSE),IT_env); - return 1; - } - - else if (!strcmp(IT_s,"stop_timer")) { - CORBA::Environment IT_env (IT_r); - CORBA::Filter* IT_f = CORBA::Orbix.getFilter (); - if (!IT_r.tcAssert ("\ -Ro~stop_timer~>{v},O{}\ -")) - return 1; - - if (IT_f && !IT_r.isException (IT_env)) - IT_f->inRequestPostM (IT_r, IT_env); - if (!IT_r.isException (IT_env)) - ((ttcp_sequence*)IT_pp)->stop_timer (IT_env); - - IT_r.replyNoResults (CORBA::Flags(CORBA::INV_NO_RESPONSE),IT_env); - return 1; - } - - else if (IT_isTarget) - IT_r.makeRuntimeException2 (); - - return 0; -} - -#define ttcp_string_dispatch_impl - -unsigned char ttcp_string_dispatch::dispatch (CORBA::Request &IT_r, - unsigned char IT_isTarget, void *IT_pp) { - if (!IT_pp) - IT_pp = m_obj; - const char *IT_s = IT_r.getOperation (); - if (!strcmp(IT_s,"send")) { - long IT_result; - CORBA::Environment IT_env (IT_r); - CORBA::Filter* IT_f = CORBA::Orbix.getFilter (); - if (!IT_r.tcAssert ("\ -Ro~send~+ttcp_str{0},>{l},N{}\ -")) - return 1; - char * ttcp_str; - IT_r.decodeStringOp(ttcp_str); - - if (IT_f && !IT_r.isException (IT_env)) - IT_f->inRequestPostM (IT_r, IT_env); - if (!IT_r.isException (IT_env)) - IT_result = ((ttcp_string*)IT_pp)->send ( ttcp_str, IT_env); - - delete [] ttcp_str; - - if (!IT_r.isException (IT_env)) { - if (!IT_r.convertToReply ("\ -l\ -", IT_env)) return 1; - IT_r << IT_result; - } - - else IT_r.makeSystemException (IT_env); - return 1; - } - - else if (!strcmp(IT_s,"start_timer")) { - CORBA::Environment IT_env (IT_r); - CORBA::Filter* IT_f = CORBA::Orbix.getFilter (); - if (!IT_r.tcAssert ("\ -Ro~start_timer~>{v},O{}\ -")) - return 1; - - if (IT_f && !IT_r.isException (IT_env)) - IT_f->inRequestPostM (IT_r, IT_env); - if (!IT_r.isException (IT_env)) - ((ttcp_string*)IT_pp)->start_timer (IT_env); - - IT_r.replyNoResults (CORBA::Flags(CORBA::INV_NO_RESPONSE),IT_env); - return 1; - } - - else if (!strcmp(IT_s,"stop_timer")) { - CORBA::Environment IT_env (IT_r); - CORBA::Filter* IT_f = CORBA::Orbix.getFilter (); - if (!IT_r.tcAssert ("\ -Ro~stop_timer~>{v},O{}\ -")) - return 1; - - if (IT_f && !IT_r.isException (IT_env)) - IT_f->inRequestPostM (IT_r, IT_env); - if (!IT_r.isException (IT_env)) - ((ttcp_string*)IT_pp)->stop_timer (IT_env); - - IT_r.replyNoResults (CORBA::Flags(CORBA::INV_NO_RESPONSE),IT_env); - return 1; - } - - else if (IT_isTarget) - IT_r.makeRuntimeException2 (); - - return 0; -} - -#include "ttcpC.cpp" - diff --git a/performance-tests/TTCP/Orbix/ttcp_i.cpp b/performance-tests/TTCP/Orbix/ttcp_i.cpp deleted file mode 100644 index 0299fe04d5c..00000000000 --- a/performance-tests/TTCP/Orbix/ttcp_i.cpp +++ /dev/null @@ -1,1010 +0,0 @@ -// $Id$ - -/* - * T T C P . C - */ - -/* #define BSD43 */ -/* #define BSD42 */ -/* #define BSD41a */ -#define SYSV /* required on SGI IRIX releases before 3.3 */ - -#include <stdio.h> -#include <signal.h> -#include <ctype.h> -#include <errno.h> -#include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> -#include <malloc.h> -#include <string.h> -#include <stdlib.h> -#include <memory.h> -#include <netinet/tcp.h> -#include <arpa/inet.h> -#include <netdb.h> -#include <sys/time.h> /* struct itimerval */ -#include <limits.h> -#include <sys/un.h> -#include <unistd.h> - -#if defined(SYSV) -#define bcopy(b1,b2,n) memcpy(b2,b1,n) -#define bzero(b1,n) memset(b1,0,n) -#include <sys/times.h> -#include <sys/param.h> -struct rusage - { - struct timeval ru_utime, ru_stime; - }; -#define RUSAGE_SELF 0 - -#else -#include <sys/resource.h> -#endif - -ACE_RCSID(Orbix, ttcp_i, "$Id$") - -void err (char *s); -void mes (char *s); -void pattern (register char *cp, register int cnt); -char *outfmt (double b); -static void getrusage (int ignored, register struct rusage *ru); -static void gettimeofday (struct timeval *tp, struct timezone *zp); -void prep_timer (void); -double read_timer (char *str, int len); -static void prusage (register struct rusage *r0, struct rusage *r1, struct timeval *e, struct timeval *b, char *outp); -static void tvadd (struct timeval *tsum, struct timeval *t0, struct timeval *t1); -static void tvsub (struct timeval *tdiff, struct timeval *t1, struct timeval *t0); -static void psecs (long l, register char *cp); -void delay (int us); -int mread (int fd, register char *bufp, unsigned n); -int Nread (int fd, void *buf, int count); -int Nwrite (int fd, void *buf, int count); -static void SD_Ready (int io_descriptor); -void set_sock_desc(int starter); -void c_stop_timer (unsigned long numbytes); - -int global_done = 0; - -int fromlen; -int domain = PF_INET; /* Default is to use Internet domain sockets. */ -char *domainname; /* Rendezvous address for UNIX domain sockets. */ -int fd; /* fd of network socket */ - -int buflen = 1024 * 1024 * 2; /* length of buffer */ -char *buf; /* ptr to dynamic buffer */ -int nbuf = 2 * 1024; /* number of buffers to send in sinkmode */ - -int bufoffset = 0; /* align buffer to this */ -int bufalign = 16 * 1024; /* modulo this */ - -int udp = 0; /* 0 = tcp, !0 = udp */ -int options = 0; /* socket options */ -int one = 1; /* for 4.3 BSD style setsockopt() */ -short port = 5001; /* TCP port number */ -char *host; /* ptr to name of host */ -int trans; /* 0=receive, !0=transmit mode */ -int sinkmode = 0; /* 0=normal I/O, !0=sink/source mode */ -int verbose = 0; /* 0=print basic info, 1=print cpu rate, proc - * resource usage. */ -int nodelay = 0; /* set TCP_NODELAY socket option */ -int b_flag = 0; /* use mread() */ -int sockbufsize = 0; /* socket buffer size to use */ -int new_line=0; /* This is a special flag */ -int write_to_file=1; /* indecates writing to file (default)*/ -int SEQUENCE=0; /* String parameter is the default */ -char fmt = 'K'; /* output format:k=kilobits,K=kilobytes, - * m = megabits, M = megabytes, - * g = gigabits, G = gigabytes */ -int touchdata = 0; /* access data after reading */ - -struct hostent *addr; -extern int errno; -extern int optind; -extern char *optarg; -char *title = 0; - -char stats[128]; -unsigned long nbytes; /* bytes on net */ -unsigned long numCalls; /* # of I/O system calls */ -double cput, realt; /* user, real time (seconds) */ - -// AAAAHHHHHHH what's this!!! C++ in the middle of C code???????!!!!!! - - -#include <iostream.h> -#include "ttcp_i.h" - -char *orb_host; - -// ttcp_i is the server side - - - -// ttcp_i is the server side - -static void -SD_Ready (int io_descriptor) -{ - cout << "Orbix is using " << io_descriptor << endl; - if (sockbufsize) - { - if (setsockopt (io_descriptor, SOL_SOCKET, SO_RCVBUF, (char *) &sockbufsize, - sizeof sockbufsize) < 0) - perror ("setsockopt: rcvbuf"), exit (1); - } -} - - -ttcp_sequence_i::ttcp_sequence_i() -{ - this->nbytes_ = 0; - // register a callback so we can futs with the descriptor - // being used by orbix. - - if (CORBA::Orbix.registerIOCallback (OrbixIOCallback(SD_Ready), FD_OPEN_CALLBACK) != 0) - perror ("can't register callback"), exit (1); -} - -void -ttcp_sequence_i::start_timer (CORBA::Environment &IT_env) -{ - this->nbytes_ = 0; - prep_timer (); -} - -void -ttcp_sequence_i::stop_timer (CORBA::Environment &IT_env) -{ - c_stop_timer (this->nbytes_); - global_done = 1; -} - -long -ttcp_sequence_i::send(const ttcp_sequence::my_sequence& ttcp_seq,CORBA::Environment &IT_env) -{ - this->nbytes_ += ttcp_seq._length; - return this->nbytes_; -} - -ttcp_string_i::ttcp_string_i() -{ - this->nbytes_ = 0; - // register a callback so we can futs with the descriptor - // being used by orbix. - if (CORBA::Orbix.registerIOCallback (OrbixIOCallback(SD_Ready), FD_OPEN_CALLBACK) != 0) - perror ("can't register callback"), exit (1); -} - -void -ttcp_string_i::start_timer (CORBA::Environment &IT_env) -{ - prep_timer (); -} - - -void -ttcp_string_i::stop_timer (CORBA::Environment &IT_env) -{ - c_stop_timer (this->nbytes_); - global_done = 1; -} - -long -ttcp_string_i::send(const char * ttcp_string,CORBA::Environment &IT_env) -{ - this->nbytes_ += strlen (ttcp_string); - return this->nbytes_; -} - -// common to sequence and string -void -c_stop_timer (unsigned long numbytes) -{ - (void) read_timer (stats, sizeof (stats)); - - if (cput <= 0.0) - cput = 0.001; - if (realt <= 0.0) - realt = 0.001; - fprintf (stdout, - "ttcp%s%s: %ld bytes in %.2f real seconds = %s/sec +++\n", - trans ? "-t" : "-r", SEQUENCE ? "(Seq)" : "(Str)", - numbytes, realt, outfmt (((double) numbytes) / realt)); - - - if (verbose) - { - fprintf (stdout, - "ttcp%s%s: %ld bytes in %.2f CPU seconds = %s/cpu sec\n", - trans ? "-t" : "-r",SEQUENCE ? "(Seq)" : "(Str)", - numbytes, cput, outfmt (((double) numbytes) / cput)); - } - fprintf (stdout, - "ttcp%s%s: %d I/O calls, msec/call = %.2f, calls/sec = %.2f\n", - trans ? "-t" : "-r",SEQUENCE ? "(Seq)" : "(Str)", - numCalls, - 1024.0 * realt / ((double) numCalls), - ((double) numCalls) / realt); - fprintf (stdout, "ttcp%s%s: %s\n", trans ? "-t" : "-r",SEQUENCE ? "(Seq)" : "(Str)", stats); - if (verbose) - { - fprintf (stdout, - "ttcp%s: buffer address %#x\n", - trans ? "-t" : "-r", - buf); - } -numbytes = 0; - - // you shoudl exit here when you use -p (profiler) so the server will - // produce mon.out -#ifdef PROFILE - exit(1); -#endif -} // end of stop_timer - - -char Usage[] = "\ -Usage: ttcp -t [-options] host [ < in ]\n\ - ttcp -r [-options > out]\n\ -Common options:\n\ - -l ## length of bufs read from or written to network (default 8192)\n\ - -u use UDP instead of TCP\n\ - -U use UNIX domain sockets instead of Internet domain sockets\n\ - -p ## port number to send to or listen at (default 5001)\n\ - -s -t: source a pattern to network\n\ - -r: sink (discard) all data from network\n\ - -A align the start of buffers to this modulus (default 16384)\n\ - -O start buffers at this offset from the modulus (default 0)\n\ - -v verbose: print more statistics\n\ - -d set SO_DEBUG socket option\n\ - -b ## set socket buffer size (if supported)\n\ - -f X format for rate: k,K = kilo{bit,byte}; m,M = mega; g,G = giga\n\ -Options specific to -t:\n\ - -n## number of source bufs written to network (default 2048)\n\ - -D don't buffer TCP writes (sets TCP_NODELAY socket option)\n\ -Options specific to -r:\n\ - -B for -s, only output full blocks as specified by -l (for TAR)\n\ - -T \"touch\": access each byte as it's read\n\ - -L<test_title> the title of the current test\n\ - -F don't write to a file (writting in a file dat.out is default)\n\ - -q run the test using sequence parameter (string is defualt) \n\ -"; - -#if !defined (__cplusplus) -typedef void (*SIG_TYP)(); -#endif - -#ifdef SVR4 -void -sigpipe (int foo) -#else -void -sigpipe () -#endif -{ -} - -int -main (int argc, char *argv[]) -{ - - unsigned long addr_tmp; - int c; - - if (argc < 2) - goto usage; - - while ((c = getopt (argc, argv, "qFdrstU:uvBDTb:L:f:l:n:p:A:O:h:x")) != -1) - { - switch (c) - { - case 'L': - title = optarg; - fprintf(stdout,"---->title=%s\n",title); - break; - case 'x': - new_line = 1; - break; - case 'q': - SEQUENCE = 1; - break; - case 'F': - write_to_file = 0; - break; - case 'h': - orb_host = optarg; - break; - case 'B': - b_flag = 1; - break; - case 't': - trans = 1; - break; - case 'r': - trans = 0; - break; - case 'd': - options |= SO_DEBUG; - break; - case 'D': -#ifdef TCP_NODELAY - nodelay = 1; -#else - fprintf (stderr, - "ttcp: -D option ignored: TCP_NODELAY socket option not supported\n"); -#endif - break; - case 'n': - nbuf = atoi (optarg); - break; - case 'l': - buflen = atoi (optarg); - break; - case 's': - sinkmode = !sinkmode; - break; - case 'p': - port = atoi (optarg); - break; - case 'U': - domain = PF_UNIX; - domainname = optarg; - break; - case 'u': - udp = 1; - break; - case 'v': - verbose = 1; - break; - case 'A': - bufalign = atoi (optarg); - break; - case 'O': - bufoffset = atoi (optarg); - break; - case 'b': -#if defined(SO_SNDBUF) || defined(SO_RCVBUF) - sockbufsize = atoi (optarg); -#else - fprintf (stderr, "ttcp: -b option ignored: SO_SNDBUF/SO_RCVBUF socket options not supported\n"); -#endif - break; - case 'f': - fmt = *optarg; - break; - case 'T': - touchdata = 1; - break; - - default: - goto usage; - } - } - - // - // Receiver - // - - if (!trans) - { - - // Sequence and String Interfaces - // instantiate ONLY one object at a time, so no dispatching overhead is counted - char *interface_name = new char[15]; - if (SEQUENCE) - { - ttcp_sequence *my_ttcp = new ttcp_sequence_i; - strcpy(interface_name,"ttcp_sequence"); - } - else - { - ttcp_string *my_ttcp_s = new ttcp_string_i; - strcpy(interface_name,"ttcp_string"); - } - - // tell Orbix/ORBeline that we have completed the server's initialization: - TRY { - CORBA::Orbix.impl_is_ready(interface_name, 0, IT_X); - - while ((!global_done) && (!IT_X)) - CORBA::Orbix.processNextEvent (CORBA::ORB::INFINITE_TIMEOUT, IT_X); - } - CATCHANY { - // an error occured calling impl_is_ready() - output the error. - cout << IT_X; - } - ENDTRY; - - cout << "server exiting" << endl; - return 0; - } - - // - // Transmitter - // - -// CORBA::Environment env; - ttcp_sequence *ttcp_seq; - ttcp_string *ttcp_str; - - - CORBA::Object *ttcp_; - - if (SEQUENCE) - { - TRY - { - ttcp_ = ttcp_seq = ttcp_sequence::_bind ("", orb_host, IT_X); - } - CATCHANY - { - // an error occurred while trying to bind to the logger object. - cerr << "Bind to object failed" << endl; - cerr << "Unexpected exception " << IT_X << endl; - return -1; - } ENDTRY; - - } - else // string parameter used - { - TRY - { - ttcp_ = ttcp_str = ttcp_string::_bind ("", orb_host, IT_X); - } - CATCHANY - { - // an error occurred while trying to bind to the logger object. - cerr << "Bind to object failed" << endl; - cerr << "Unexpected exception " << IT_X << endl; - return -1; - } ENDTRY; - } - - if (sockbufsize) - { - if (setsockopt (ttcp_->_fd (), SOL_SOCKET, SO_SNDBUF, (char *) &sockbufsize, - sizeof sockbufsize) < 0) - err ("setsockopt: sndbuf"); - mes ("sndbuf"); - } - - if (nodelay) - { - struct protoent *p; - p = getprotobyname ("tcp"); - if (setsockopt (ttcp_->_fd (), - p->p_proto, - TCP_NODELAY, - (char *)& one, - sizeof (one))) - err ("setsockopt: nodelay"); - mes ("nodelay"); - } - - // - // Prepare the Message to be sent - // - - errno = 0; - if (sinkmode) - { - if ((buf = (char *) malloc (buflen + bufalign)) == (char *) NULL) - err ("malloc"); - if (bufalign != 0) - buf += (bufalign - ((int) buf % bufalign) + bufoffset) % bufalign; - - // ttcp_sequence::my_sequence sequence_message; ORBIX - ttcp_sequence::my_sequence message (buflen + 1); - ::buf[::buflen-1] = '\0'; - if (SEQUENCE) - { - message._maximum = buflen; - message._length = buflen; - message._buffer = buf; - } - - - pattern (buf, buflen); - // - // Start the timers on the client and server sides - // - - prep_timer (); - - if (SEQUENCE) - ttcp_seq->start_timer (); - else - ttcp_str->start_timer (); - while (nbuf--) - { - if (SEQUENCE) - ttcp_seq->send (message); - else - ttcp_str->send (buf); - - numCalls++; - nbytes += buflen; - } - - } - else - { - register int cnt; - while ((cnt = read (0, buf, buflen)) > 0 && - Nwrite (fd, buf, cnt) == cnt) - nbytes += cnt; - } - - if (errno) - err ("IO"); - - - // - // Stop the timers on both sides - // - - - if (SEQUENCE) - ttcp_seq->stop_timer(); - else - ttcp_str->stop_timer(); - - - (void) read_timer (stats, sizeof (stats)); - - - // - // Print the results. - // - - if (cput <= 0.0) - cput = 0.001; - if (realt <= 0.0) - realt = 0.001; - - if (write_to_file) - { - if (title != 0) - { - double tmp; - FILE *fd; - char filename[BUFSIZ]; - sprintf (filename, "%s.results", title); - fd = fopen(filename,"a+"); - if (new_line) - fprintf(fd,"\n -l %ldk \t", buflen/1024); - tmp = ((double) nbytes) / realt; - fprintf(fd,"%.2f ", tmp * 8.0 / 1024.0 / 1024.0); - fclose(fd); - } - } - - fprintf (stdout, - "\nttcp%s%s: %ld bytes in %.2f real seconds = %s/sec +++\n", - trans ? "-t" : "-r", SEQUENCE ? "(Seq)" : "(Str)", - nbytes, realt, outfmt (((double) nbytes) / realt)); - - if (verbose) - { - fprintf (stdout, - "ttcp%s%s: %ld bytes in %.2f CPU seconds = %s/cpu sec\n", - trans ? "-t" : "-r", SEQUENCE ? "(Seq)" : "(Str)", - nbytes, cput, outfmt (((double) nbytes) / cput)); - } - fprintf (stdout, - "ttcp%s%s: %d I/O calls, msec/call = %.2f, calls/sec = %.2f\n", - trans ? "-t" : "-r", SEQUENCE ? "(Seq)" : "(Str)", - numCalls, - 1024.0 * realt / ((double) numCalls), - ((double) numCalls) / realt); - fprintf (stdout, "ttcp%s%s: %s\n",trans ? "-t" : "-r", SEQUENCE ? "(Seq)" : "(Str)", stats); - if (verbose) - { - fprintf (stdout, - "ttcp%s: buffer address %#x\n", - trans ? "-t" : "-r", - buf); - } - exit (0); - - usage: - fprintf (stderr, Usage); - return 1; -} - -void -err (char *s) -{ - fprintf (stderr, "ttcp%s: ", trans ? "-t" : "-r"); - perror (s); - fprintf (stderr, "errno=%d\n", errno); - exit (1); -} - -void -mes (char *s) -{ - fprintf (stderr, "ttcp%s%s: %s\n", trans ? "-t" : "-r",SEQUENCE ? "(Seq)" : "(Str)", s); -// fprintf (stderr, "ttcp%s: %s\n", trans ? "-t" : "-r", s); -} - -void -pattern (register char *cp, register int cnt) -{ - register char c; - c = 0; - while (cnt-- > 0) - { - while (!isprint ((c & 0x7F))) - c++; - *cp++ = (c++ & 0x7F); - } -} - -char * -outfmt (double b) -{ - static char obuf[50]; - switch (fmt) - { - case 'G': - sprintf (obuf, "%.2f GB", b / 1024.0 / 1024.0 / 1024.0); - break; - default: - case 'K': - sprintf (obuf, "%.2f KB", b / 1024.0); - break; - case 'M': - sprintf (obuf, "%.2f MB", b / 1024.0 / 1024.0); - break; - case 'g': - sprintf (obuf, "%.2f Gbit", b * 8.0 / 1024.0 / 1024.0 / 1024.0); - break; - case 'k': - sprintf (obuf, "%.2f Kbit", b * 8.0 / 1024.0); - break; - case 'm': - sprintf (obuf, "%.2f Mbit", b * 8.0 / 1024.0 / 1024.0); - break; - } - return obuf; -} - -static struct itimerval itime0; /* Time at which timing started */ -static struct rusage ru0; /* Resource utilization at the start */ - -#if defined(SYSV) -/*ARGSUSED */ -static void -getrusage (int ignored, register struct rusage *ru) -{ - struct tms buf; - - times (&buf); - - /* Assumption: HZ <= 2147 (LONG_MAX/1000000) */ - ru->ru_stime.tv_sec = buf.tms_stime / HZ; - ru->ru_stime.tv_usec = ((buf.tms_stime % HZ) * 1000000) / HZ; - ru->ru_utime.tv_sec = buf.tms_utime / HZ; - ru->ru_utime.tv_usec = ((buf.tms_utime % HZ) * 1000000) / HZ; -} - -/*ARGSUSED */ -static void -gettimeofday (struct timeval *tp, struct timezone *zp) -{ - tp->tv_sec = time (0); - tp->tv_usec = 0; -} -#endif /* SYSV */ -/* - * P R E P _ T I M E R - */ -void -prep_timer () -{ - itime0.it_interval.tv_sec = 0; - itime0.it_interval.tv_usec = 0; - itime0.it_value.tv_sec = LONG_MAX / 22; /* greatest possible value , itimer() count backwards */ - itime0.it_value.tv_usec = 0; - - - getrusage (RUSAGE_SELF, &ru0); - - /* Init REAL Timer */ - if (setitimer (ITIMER_REAL, &itime0, NULL)) - { - perror ("Setting 'itimer' REAL failed"); - return; - } - -} - -/* - * R E A D _ T I M E R - * - */ -double -read_timer (char *str, int len) -{ - struct itimerval itimedol; - struct rusage ru1; - struct timeval td; - struct timeval tend, tstart; - char line[132]; - - getrusage (RUSAGE_SELF, &ru1); - - if (getitimer (ITIMER_REAL, &itimedol)) - { - perror ("Getting 'itimer' REAL failed"); - return (0.0); - } - - prusage (&ru0, &ru1, &itime0.it_value, &itimedol.it_value, line); - (void) strncpy (str, line, len); - - /* Get real time */ - tvsub (&td, &itime0.it_value, &itimedol.it_value); - realt = td.tv_sec + ((double) td.tv_usec) / 1000000; - - /* Get CPU time (user+sys) */ - tvadd (&tend, &ru1.ru_utime, &ru1.ru_stime); - tvadd (&tstart, &ru0.ru_utime, &ru0.ru_stime); - tvsub (&td, &tend, &tstart); - cput = td.tv_sec + ((double) td.tv_usec) / 1000000; - if (cput < 0.00001) - cput = 0.00001; - return (cput); -} - -static void -prusage (register struct rusage *r0, struct rusage *r1, - struct timeval *e, struct timeval *b, char *outp) -{ - struct timeval tdiff; - register time_t t; - register char *cp; - register int i; - int ms; - - t = (r1->ru_utime.tv_sec - r0->ru_utime.tv_sec) * 100 + - (r1->ru_utime.tv_usec - r0->ru_utime.tv_usec) / 10000 + - (r1->ru_stime.tv_sec - r0->ru_stime.tv_sec) * 100 + - (r1->ru_stime.tv_usec - r0->ru_stime.tv_usec) / 10000; - ms = (e->tv_sec - b->tv_sec) * 100 + (e->tv_usec - b->tv_usec) / 10000; - -#define END(x) {while(*x) x++;} -#if defined(SYSV) - cp = "%Uuser %Ssys %Ereal %P"; -#else -#if defined(sgi) /* IRIX 3.3 will show 0 for %M,%F,%R,%C */ - cp = "%Uuser %Ssys %Ereal %P %Mmaxrss %F+%Rpf %Ccsw"; -#else - cp = "%Uuser %Ssys %Ereal %P %Xi+%Dd %Mmaxrss %F+%Rpf %Ccsw"; -#endif -#endif - for (; *cp; cp++) - { - if (*cp != '%') - *outp++ = *cp; - else if (cp[1]) - switch (*++cp) - { - - case 'U': - tvsub (&tdiff, &r1->ru_utime, &r0->ru_utime); - sprintf (outp, "%d.%01d", tdiff.tv_sec, tdiff.tv_usec / 100000); - END (outp); - break; - - case 'S': - tvsub (&tdiff, &r1->ru_stime, &r0->ru_stime); - sprintf (outp, "%d.%01d", tdiff.tv_sec, tdiff.tv_usec / 100000); - END (outp); - break; - - case 'E': - psecs (ms / 100, outp); - END (outp); - break; - - case 'P': - sprintf (outp, "%d%%", (int) (t * 100 / ((ms ? ms : 1)))); - END (outp); - break; - -#if !defined(SYSV) - case 'W': - i = r1->ru_nswap - r0->ru_nswap; - sprintf (outp, "%d", i); - END (outp); - break; - - case 'X': - sprintf (outp, "%d", t == 0 ? 0 : (r1->ru_ixrss - r0->ru_ixrss) / t); - END (outp); - break; - - case 'D': - sprintf (outp, "%d", t == 0 ? 0 : - (r1->ru_idrss + r1->ru_isrss - (r0->ru_idrss + r0->ru_isrss)) / t); - END (outp); - break; - - case 'K': - sprintf (outp, "%d", t == 0 ? 0 : - ((r1->ru_ixrss + r1->ru_isrss + r1->ru_idrss) - - (r0->ru_ixrss + r0->ru_idrss + r0->ru_isrss)) / t); - END (outp); - break; - - case 'M': - sprintf (outp, "%d", r1->ru_maxrss / 2); - END (outp); - break; - - case 'F': - sprintf (outp, "%d", r1->ru_majflt - r0->ru_majflt); - END (outp); - break; - - case 'R': - sprintf (outp, "%d", r1->ru_minflt - r0->ru_minflt); - END (outp); - break; - - case 'I': - sprintf (outp, "%d", r1->ru_inblock - r0->ru_inblock); - END (outp); - break; - - case 'O': - sprintf (outp, "%d", r1->ru_oublock - r0->ru_oublock); - END (outp); - break; - case 'C': - sprintf (outp, "%d+%d", r1->ru_nvcsw - r0->ru_nvcsw, - r1->ru_nivcsw - r0->ru_nivcsw); - END (outp); - break; -#endif /* !SYSV */ - } - } - *outp = '\0'; -} - -static void -tvadd (struct timeval *tsum, struct timeval *t0, struct timeval *t1) -{ - - tsum->tv_sec = t0->tv_sec + t1->tv_sec; - tsum->tv_usec = t0->tv_usec + t1->tv_usec; - if (tsum->tv_usec > 1000000) - tsum->tv_sec++, tsum->tv_usec -= 1000000; -} - -static void -tvsub (struct timeval *tdiff, struct timeval *t1, struct timeval *t0) -{ - - tdiff->tv_sec = t1->tv_sec - t0->tv_sec; - tdiff->tv_usec = t1->tv_usec - t0->tv_usec; - if (tdiff->tv_usec < 0) - tdiff->tv_sec--, tdiff->tv_usec += 1000000; -} - -static void -psecs (long l, register char *cp) -{ - register int i; - - i = l / 3600; - if (i) - { - sprintf (cp, "%d:", i); - END (cp); - i = l % 3600; - sprintf (cp, "%d%d", (i / 60) / 10, (i / 60) % 10); - END (cp); - } - else - { - i = l; - sprintf (cp, "%d", i / 60); - END (cp); - } - i %= 60; - *cp++ = ':'; - sprintf (cp, "%d%d", i / 10, i % 10); -} - -/* - * N R E A D - */ -int -Nread (int fd, void *buf, int count) -{ - struct sockaddr_in from; - int len = sizeof (from); - register int cnt; - if (udp) - { - cnt = recvfrom (fd, (char *) buf, count, 0, (struct sockaddr *) &from, &len); - numCalls++; - } - else - { - if (b_flag) - cnt = mread (fd, (char *) buf, count); /* fill buf */ - else - { - cnt = read (fd, buf, count); - numCalls++; - } - if (touchdata && cnt > 0) - { - register int c = cnt, sum; - register char *b = (char *) buf; - while (c--) - sum += *b++; - } - } - return (cnt); -} - - -/* - * N W R I T E - */ -int -Nwrite (int fd, void *buf, int count) -{ - return 0; -} - -void -delay (int us) -{ - struct timeval tv; - - tv.tv_sec = 0; - tv.tv_usec = us; - (void) select (1, (fd_set *) 0, (fd_set *) 0, (fd_set *) 0, &tv); -} - -/* - * M R E A D - * - * This function performs the function of a read(II) but will - * call read(II) multiple times in order to get the requested - * number of characters. This can be necessary because - * network connections don't deliver data with the same - * grouping as it is written with. Written by Robert S. Miles, BRL. - */ -int -mread (int fd, register char *bufp, unsigned n) -{ - register unsigned count = 0; - register int nread; - - do - { - nread = read (fd, bufp, n - count); - numCalls++; - if (nread < 0) - { - perror ("ttcp_mread"); - return (-1); - } - if (nread == 0) - return ((int) count); - count += (unsigned) nread; - bufp += nread; - } - while (count < n); - - return ((int) count); -} diff --git a/performance-tests/TTCP/Orbix/ttcp_i.h b/performance-tests/TTCP/Orbix/ttcp_i.h deleted file mode 100644 index b9caf2135a5..00000000000 --- a/performance-tests/TTCP/Orbix/ttcp_i.h +++ /dev/null @@ -1,46 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - - -// ttcp_i.C -// - -#ifndef TTCP_I_H -#define TTCP_I_H - -#include "ttcp.hh" - -class ttcp_sequence_i - : virtual public ttcp_sequenceBOAImpl -{ -public: - ttcp_sequence_i(); - - virtual long send (const ttcp_sequence::my_sequence& ttcp_seq, CORBA::Environment &IT_env=CORBA::default_environment); - virtual void start_timer (CORBA::Environment &IT_env=CORBA::default_environment); - virtual void stop_timer (CORBA::Environment &IT_env=CORBA::default_environment); -private: - unsigned long nbytes_; -}; - -// DEF_TIE_ttcp_sequence (ttcp_sequence_i); - -class ttcp_string_i - : virtual public ttcp_stringBOAImpl -{ -public: - ttcp_string_i(); - - virtual long send (const char * ttcp_string, CORBA::Environment &IT_env=CORBA::default_environment); - virtual void start_timer (CORBA::Environment &IT_env=CORBA::default_environment); - virtual void stop_timer (CORBA::Environment &IT_env=CORBA::default_environment); -private: - unsigned long nbytes_; -}; - -#endif defined (TTCP_I_H) - - - - - |