source: trunk/ETSI-Testsuites/ETSI_auto_IOT/adapter/src/Capture/TcpipDispatch.h @ 32

Last change on this file since 32 was 22, checked in by rings, 14 years ago
  • Property svn:executable set to *
File size: 949 bytes
Line 
1/**
2 * @file TcpipDispatch.h
3 * This header file defines the TcpipDispatch class.
4 * @author Tomas Urban
5 * @version 0.2
6 * @date 21/07/2009
7 */
8#ifndef TCPIP_DISPATCH_H
9#define TCPIP_DISPATCH_H
10
11#include "CaptureDispatch.h"
12#include <boost/thread/mutex.hpp>
13#include "TcpipDefs.h"
14
15/**
16 * This class uses a TCP/IP connection for dispatching captured data messages.
17 */
18class TcpipDispatch :
19        public CaptureDispatch
20{
21private:
22        boost::mutex m_mutex;
23        SOCKET_TYPE m_hSocket;
24public:
25        /**
26         * The constructor requires a handle to an existing socket. This socket is then used
27         * for sending captured messages to a remote host.
28         * @param hSocket Socket handle
29         */
30        TcpipDispatch(SOCKET_TYPE hSocket);
31        virtual ~TcpipDispatch(void);
32        /**
33         * This method stops sending messages over the underlying TCP/IP connection. The method
34         * is typically used in closing scenarios.
35         */
36        void Stop();
37        virtual void DispatchData(CapturedData * pData);
38};
39
40#endif
Note: See TracBrowser for help on using the repository browser.