36 #ifndef OPAL_OPAL_TRANSPORT_H
37 #define OPAL_OPAL_TRANSPORT_H
45 #include <ptlib/sockets.h>
46 #include <ptclib/psockbun.h>
157 const char * address,
159 const char * proto = NULL
162 const PString & address,
164 const char * proto = NULL
167 const PIPSocket::Address & ip,
169 const char * proto = NULL
182 bool wildcards =
false
193 PCaselessString
GetProto(
bool withDollar =
false)
const {
return Left(Find(
'$')+(withDollar?1:0)); }
203 PBoolean
GetIpAndPort(PIPSocket::Address & ip, WORD & port)
const;
204 PBoolean
GetIpAndPort(PIPSocketAddressAndPort & ipPort)
const;
307 const PStringArray & array
310 const PStringList & list
313 const PSortedStringList & list
320 const PString & address
328 const PCollection & coll
393 virtual PBoolean
Open(
400 virtual PBoolean
IsOpen() = 0;
404 virtual void Close() = 0;
409 const PTimeInterval & timeout
474 PIPSocket::Address binding = PIPSocket::GetDefaultIpAny(),
476 PBoolean exclusive =
true
522 PIPSocket::Address binding = PIPSocket::GetDefaultIpAny(),
524 PBoolean exclusive =
true
559 virtual PBoolean
Open(
566 virtual PBoolean
IsOpen();
570 virtual void Close();
575 const PTimeInterval & timeout
604 PIPSocket::Address binding = PIPSocket::GetDefaultIpAny(),
606 PBoolean exclusive =
true
641 virtual PBoolean
Open(
648 virtual PBoolean
IsOpen();
652 virtual void Close();
657 const PTimeInterval & timeout
746 const PString & iface
778 virtual PBoolean
Connect() = 0;
788 virtual PBoolean
Close();
858 const PBYTEArray & pdu
916 PIPSocket::Address binding,
974 PIPSocket::Address binding = PIPSocket::GetDefaultIpAny(),
976 PBoolean reuseAddr =
false
1022 const PBYTEArray & pdu
1041 virtual PBoolean
OnOpen();
1058 PIPSocket::Address binding = PIPSocket::GetDefaultIpAny(),
1060 bool reuseAddr =
false,
1061 bool preOpen =
false
1068 const PMonitoredSocketsPtr & sockets,
1069 const PString & iface
1078 virtual PBoolean
Read(
1116 const PString & iface
1122 bool allowNAT =
true
1188 const PBYTEArray & pdu
1239 PIPSocket::Address & ip,
1268 PIPSocket::Address & ip,
1275 PIPSocket::Address & ip,
1277 PBoolean & reuseAddr);
1280 template <
class ListenerType,
class TransportType,
unsigned AltTypeOption,
class AltTypeClass>
1290 return new ListenerType(endpoint, address, options);
1299 PIPSocket::Address ip;
1303 if (options == AltTypeOption)
1304 return new AltTypeClass(endpoint, ip, 0, reuseAddr);
1306 return new TransportType(endpoint, ip, 0, reuseAddr);
1325 PIPSocket::Address binding = PIPSocket::GetDefaultIpAny(),
1327 PBoolean exclusive =
true
1337 ~OpalListenerTCPS();
1345 PSSLContext * sslContext;
1354 PIPSocket::Address binding = PIPSocket::GetDefaultIpAny(),
1356 PBoolean reuseAddr =
false
1364 ~OpalTransportTCPS();
1372 PSSLContext * sslContext;
1378 #endif // OPAL_PTLIB_SSL
1381 #endif // OPAL_OPAL_TRANSPORT_H