55 const char * service =
"socks 1080"
78 const char * hostname,
142 unsigned queueSize = 5,
244 const char * hostname,
351 unsigned queueSize = 5,
422 #endif // PTLIB_SOCKS_H
PSocksUDPSocket(WORD port=0)
#define PCLASSINFO(cls, par)
Declare all the standard PTLib class information.
Definition: object.h:2164
virtual PObject * Clone() const
Create a copy of the class on the heap.
PString GetLocalAddress() const
Get the Internet Protocol address and port for the local host.
WORD localPort
Definition: socks.h:92
Base class for implementing the SOCKS protocol for use with PSocksSocket and PSocksUDPSocket.
Definition: socks.h:43
A socket channel that uses the UDP transport on the Internet Protocol.
Definition: udpsock.h:42
PIPSocket::Address localAddress
Definition: socks.h:91
virtual PBoolean Listen(unsigned queueSize=5, WORD port=0, Reusability reuse=AddressIsExclusive)
Listen on a socket for a remote host on the specified port number.
PSocksProtocol(WORD port)
PString serverHost
Definition: socks.h:85
virtual PBoolean WriteTo(const void *buf, PINDEX len, const Address &addr, WORD port)
Write a datagram to a remote computer.
virtual PBoolean SendSocksCommand(PTCPSocket &socket, BYTE command, const char *hostname, PIPSocket::Address addr)
P_INT_PTR TransferHandle(PSocksSocket &destination)
PString GetPeerAddress() const
Get the Internet Protocol address for the peer host and port the socket is connected to...
virtual ~PSocksProtocol()
Definition: socks.h:47
PBoolean Accept()
Open a socket to a remote host on the specified port number.
PSocksSocket(WORD port=0)
Errors
Normalised error codes.
Definition: channel.h:227
This class allows access to RFC1928 compliant SOCKS server.
Definition: socks.h:254
PTCPSocket socksControl
Definition: socks.h:414
bool PBoolean
Definition: object.h:174
virtual PBoolean ReceiveSocksResponse(PTCPSocket &socket, PIPSocket::Address &addr, WORD &port)
intptr_t P_INT_PTR
Definition: object.h:2646
This is an ancestor class allowing access to a SOCKS servers (version 4 and 5).
Definition: socks.h:98
virtual PBoolean SendSocksCommand(PTCPSocket &socket, BYTE command, const char *hostname, PIPSocket::Address addr)
The character string class.
Definition: pstring.h:108
WORD remotePort
Definition: socks.h:90
PIPSocket::Address remoteAddress
Definition: socks.h:89
virtual PBoolean Connect(const PString &address)
Connect a socket to a remote host on the specified port number.
A socket that uses the TCP transport on the Internet Protocol.
Definition: tcpsock.h:40
PString authenticationUsername
Definition: socks.h:87
PBoolean SetServer(const PString &hostname, const char *service="socks 1080")
virtual void SetErrorCodes(PChannel::Errors errCode, int osErr)
virtual PBoolean ReadFrom(void *buf, PINDEX len, Address &addr, WORD &port)
Read a datagram from a remote computer.
A class describing an IP address.
Definition: ipsock.h:59
This class allows access to RFC1928 compliant SOCKS server.
Definition: socks.h:286
virtual PBoolean ReceiveSocksResponse(PTCPSocket &socket, PIPSocket::Address &addr, WORD &port)
virtual void SetErrorCodes(PChannel::Errors errCode, int osErr)
PBoolean ConnectSocksServer(PTCPSocket &thisSocket)
This class allows access to RFC1928 compliant SOCKS server.
Definition: socks.h:212
PSocks4Socket(WORD port=0)
virtual PBoolean Listen(unsigned queueSize=5, WORD port=0, Reusability reuse=AddressIsExclusive)
Listen on a socket for a remote host on the specified port number.
PSocks5Socket(WORD port=0)
virtual void SetErrorCodes(PChannel::Errors errCode, int osErr)=0
void SetAuthentication(const PString &username, const PString &password)
Set the username and password for the SOCKS server authentication.
A network communications channel.
Definition: socket.h:59
virtual PBoolean Connect(const PString &address)
Connect a socket to a remote host on the specified port number.
WORD serverPort
Definition: socks.h:86
Address serverAddress
Definition: socks.h:415
Reusability
Flags to reuse of port numbers in Listen() function.
Definition: socket.h:85
Ultimate parent class for all objects in the class library.
Definition: object.h:2204
virtual PObject * Clone() const
Create a copy of the class on the heap.
PString authenticationPassword
Definition: socks.h:88
virtual PObject * Clone() const
Create a copy of the class on the heap.