59 const char * service =
"socks 1080"
82 const char * hostname,
146 unsigned queueSize = 5,
248 const char * hostname,
355 unsigned queueSize = 5,
426 #endif // PTLIB_SOCKS_H
PSocksUDPSocket(WORD port=0)
#define PCLASSINFO(cls, par)
Declare all the standard PTLib class information.
Definition: object.h:1049
virtual PObject * Clone() const
Create a copy of the class on the heap.
WORD localPort
Definition: socks.h:96
int TransferHandle(PSocksSocket &destination)
Base class for implementing the SOCKS protocol for use with PSocksSocket and PSocksUDPSocket.
Definition: socks.h:47
A socket channel that uses the UDP transport on the Internet Protocol.
Definition: udpsock.h:47
PIPSocket::Address localAddress
Definition: socks.h:95
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.
virtual PString GetLocalAddress()
Get the Internet Protocol address and port for the local host.
PSocksProtocol(WORD port)
PString serverHost
Definition: socks.h:89
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)
WORD port
Port to be used by the socket when opening the channel.
Definition: socket.h:444
virtual ~PSocksProtocol()
Definition: socks.h:51
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:529
BOOL PBoolean
Definition: object.h:102
This class allows access to RFC1928 compliant SOCKS server.
Definition: socks.h:258
PTCPSocket socksControl
Definition: socks.h:418
virtual PBoolean ReceiveSocksResponse(PTCPSocket &socket, PIPSocket::Address &addr, WORD &port)
This is an ancestor class allowing access to a SOCKS servers (version 4 and 5).
Definition: socks.h:102
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:94
PIPSocket::Address remoteAddress
Definition: socks.h:93
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:44
PString authenticationUsername
Definition: socks.h:91
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:75
This class allows access to RFC1928 compliant SOCKS server.
Definition: socks.h:290
virtual PString GetPeerAddress()
Get the Internet Protocol address for the peer host and port the socket is connected to...
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:216
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:58
virtual PBoolean Connect(const PString &address)
Connect a socket to a remote host on the specified port number.
WORD serverPort
Definition: socks.h:90
Address serverAddress
Definition: socks.h:419
Reusability
Flags to reuse of port numbers in Listen() function.
Definition: socket.h:84
Ultimate parent class for all objects in the class library.
Definition: object.h:1118
virtual PObject * Clone() const
Create a copy of the class on the heap.
PString authenticationPassword
Definition: socks.h:92
virtual PObject * Clone() const
Create a copy of the class on the heap.