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;
210 bool includeService =
false
309 const PStringArray & array
312 const PStringList & list
315 const PSortedStringList & list
322 const PString & address
330 const PCollection & coll
395 virtual PBoolean
Open(
402 virtual PBoolean
IsOpen() = 0;
406 virtual void Close() = 0;
411 const PTimeInterval & timeout
476 PIPSocket::Address binding = PIPSocket::GetDefaultIpAny(),
478 PBoolean exclusive =
true
524 PIPSocket::Address binding = PIPSocket::GetDefaultIpAny(),
526 PBoolean exclusive =
true
561 virtual PBoolean
Open(
568 virtual PBoolean
IsOpen();
572 virtual void Close();
577 const PTimeInterval & timeout
606 PIPSocket::Address binding = PIPSocket::GetDefaultIpAny(),
608 PBoolean exclusive =
true
643 virtual PBoolean
Open(
650 virtual PBoolean
IsOpen();
654 virtual void Close();
659 const PTimeInterval & timeout
748 const PString & iface
780 virtual PBoolean
Connect() = 0;
790 virtual PBoolean
Close();
860 const PBYTEArray & pdu
918 PIPSocket::Address binding,
976 PIPSocket::Address binding = PIPSocket::GetDefaultIpAny(),
978 PBoolean reuseAddr =
false
1024 const PBYTEArray & pdu
1043 virtual PBoolean
OnOpen();
1060 PIPSocket::Address binding = PIPSocket::GetDefaultIpAny(),
1062 bool reuseAddr =
false,
1063 bool preOpen =
false
1070 const PMonitoredSocketsPtr & sockets,
1071 const PString & iface
1080 virtual PBoolean
Read(
1118 const PString & iface
1124 bool allowNAT =
true
1190 const PBYTEArray & pdu
1242 PIPSocket::Address & ip,
1272 PIPSocket::Address & ip,
1279 PIPSocket::Address & ip,
1281 PBoolean & reuseAddr);
1284 template <
class ListenerType,
class TransportType,
unsigned AltTypeOption,
class AltTypeClass>
1294 return new ListenerType(endpoint, address, options);
1303 PIPSocket::Address ip;
1307 if (options == AltTypeOption)
1308 return new AltTypeClass(endpoint, ip, 0, reuseAddr);
1310 return new TransportType(endpoint, ip, 0, reuseAddr);
1329 PIPSocket::Address binding = PIPSocket::GetDefaultIpAny(),
1331 PBoolean exclusive =
true
1341 ~OpalListenerTCPS();
1349 PSSLContext * sslContext;
1358 PIPSocket::Address binding = PIPSocket::GetDefaultIpAny(),
1360 PBoolean reuseAddr =
false
1368 ~OpalTransportTCPS();
1376 PSSLContext * sslContext;
1382 #endif // OPAL_PTLIB_SSL
1385 #endif // OPAL_OPAL_TRANSPORT_H