Rconnect()

Initiate a connection on a socket (via a SOCKS server)

Synopsis:

#include <sys/types.h>
#include <sys/socket.h>

int Rconnect( int s, 
              const struct sockaddr * name, 
              int namelen);

Arguments:

s
The descriptor of the socket on which to initiate the connection.
name
The name of the socket to connect to for a SOCK_STREAM connection.
namelen
The length of the name, in bytes.

Library:

libsocks

Use the -l socks option to qcc to link against this library.

Description:

The Rconnect() function is a cover function for connect() — the difference is that Rconnect() does its job via a SOCKS server.

For more information about SOCKS and its libraries, see the appendix, SOCKS — A Basic Firewall.

Returns:

0
Success.
-1
An error occurred (errno is set).

Classification:

SOCKS

Safety:  
Cancellation point No
Interrupt handler No
Signal handler No
Thread No