1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
|
/* -*- c++ -*- */
// $Id: Datagram.h 91743 2010-09-13 18:24:51Z johnnyw $
#ifndef JAWS_DATAGRAM_H
#define JAWS_DATAGRAM_H
#include "ace/Addr.h"
#include "ace/Synch.h"
#include "ace/Singleton.h"
#include "ace/SOCK_Dgram.h"
#include "jaws3/Export.h"
#include "jaws3/Event_Completer.h"
class JAWS_Export JAWS_Datagram_Impl
{
public:
virtual ~JAWS_Datagram_Impl (void) {}
virtual void accept ( const ACE_Addr &local_sap
, ACE_SOCK_Dgram &new_dgram
, JAWS_Event_Completer *completer
, void *act = 0
) = 0;
// The address to new_dgram is passed back as the data member of
// the JAWS_Event_Result that is returned to the completer.
virtual void connect ( const ACE_Addr &remote_sap
, ACE_SOCK_Dgram &new_dgram
, JAWS_Event_Completer *completer
, void *act = 0
) = 0;
// The address to new_dgram is passed back as the data member of
// the JAWS_Event_Result that is returned to the completer.
// ADDR_ANY is assumed for the local access point.
virtual void connect ( const ACE_Addr &remote_sap
, ACE_SOCK_Dgram &new_dgram
, const ACE_Addr &local_sap
, JAWS_Event_Completer *completer
, void *act = 0
) = 0;
// The address to new_dgram is passed back as the data member of
// the JAWS_Event_Result that is returned to the completer.
// Use the specified local access point.
virtual void accept ( const ACE_Addr &local_sap
, ACE_SOCK_Dgram &new_dgram
, JAWS_Event_Completer *completer
, const ACE_Time_Value &timeout
, void *act = 0
) = 0;
// The address to new_dgram is passed back as the data member of
// the JAWS_Event_Result that is returned to the completer.
virtual void connect ( const ACE_Addr &remote_sap
, ACE_SOCK_Dgram &new_dgram
, JAWS_Event_Completer *completer
, const ACE_Time_Value &timeout
, void *act = 0
) = 0;
// The address to new_dgram is passed back as the data member of
// the JAWS_Event_Result that is returned to the completer.
// ADDR_ANY is assumed for the local access point.
virtual void connect ( const ACE_Addr &remote_sap
, ACE_SOCK_Dgram &new_dgram
, const ACE_Addr &local_sap
, JAWS_Event_Completer *completer
, const ACE_Time_Value &timeout
, void *act = 0
) = 0;
// The address to new_dgram is passed back as the data member of
// the JAWS_Event_Result that is returned to the completer.
// Use the specified local access point.
};
class JAWS_Export JAWS_Datagram
{
public:
JAWS_Datagram (JAWS_Datagram_Impl *impl = 0);
static JAWS_Datagram * instance (void)
{
return ACE_Singleton<JAWS_Datagram, ACE_SYNCH_MUTEX>::instance ();
}
void accept ( const ACE_Addr &local_sap
, ACE_SOCK_Dgram &new_dgram
, JAWS_Event_Completer *completer
, void *act = 0
);
void connect ( const ACE_Addr &remote_sap
, ACE_SOCK_Dgram &new_dgram
, JAWS_Event_Completer *completer
, void *act = 0
);
void connect ( const ACE_Addr &remote_sap
, ACE_SOCK_Dgram &new_dgram
, const ACE_Addr &local_sap
, JAWS_Event_Completer *completer
, void *act = 0
);
void accept ( const ACE_Addr &local_sap
, ACE_SOCK_Dgram &new_dgram
, JAWS_Event_Completer *completer
, const ACE_Time_Value &timeout
, void *act = 0
);
void connect ( const ACE_Addr &remote_sap
, ACE_SOCK_Dgram &new_dgram
, JAWS_Event_Completer *completer
, const ACE_Time_Value &timeout
, void *act = 0
);
void connect ( const ACE_Addr &remote_sap
, ACE_SOCK_Dgram &new_dgram
, const ACE_Addr &local_sap
, JAWS_Event_Completer *completer
, const ACE_Time_Value &timeout
, void *act = 0
);
private:
JAWS_Datagram_Impl *impl_;
};
#endif /* JAWS_DATAGRAM_H */
|