summaryrefslogtreecommitdiff
path: root/TAO/tests/Big_Request_Muxing/Payload_Receiver.h
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/Big_Request_Muxing/Payload_Receiver.h')
-rw-r--r--TAO/tests/Big_Request_Muxing/Payload_Receiver.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/TAO/tests/Big_Request_Muxing/Payload_Receiver.h b/TAO/tests/Big_Request_Muxing/Payload_Receiver.h
new file mode 100644
index 00000000000..73787c62451
--- /dev/null
+++ b/TAO/tests/Big_Request_Muxing/Payload_Receiver.h
@@ -0,0 +1,50 @@
+//
+// $Id$
+//
+
+#ifndef BIG_REQUEST_MUXING_PAYLOAD_RECEIVER_H
+#define BIG_REQUEST_MUXING_PAYLOAD_RECEIVER_H
+#include "ace/pre.h"
+
+#include "TestS.h"
+
+#if defined (_MSC_VER)
+# if (_MSC_VER >= 1200)
+# pragma warning(push)
+# endif /* _MSC_VER >= 1200 */
+# pragma warning (disable:4250)
+#endif /* _MSC_VER */
+
+/// Implement the Test::Payload_Receiver interface
+/**
+ * Simply print count how many bytes were received.
+ */
+class Payload_Receiver
+ : public virtual POA_Test::Payload_Receiver
+ , public virtual PortableServer::RefCountServantBase
+{
+public:
+ /// Constructor
+ Payload_Receiver (void);
+
+ // = The skeleton methods
+ virtual void more_data (const Test::Payload &payload,
+ CORBA::Environment &ACE_TRY_ENV)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+ virtual CORBA::Long get_message_count (CORBA::Environment &ACE_TRY_ENV)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+private:
+ /// Count the number of messages received
+ CORBA::ULong message_count_;
+
+ /// Count the number of bytes received
+ CORBA::ULong byte_count_;
+};
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma warning(pop)
+#endif /* _MSC_VER */
+
+#include "ace/post.h"
+#endif /* BIG_REQUEST_MUXING_PAYLOAD_RECEIVER_H */