63 |
|
|
64 |
|
|
65 |
/** |
/** |
66 |
|
* Factory method for creating a Socket object from an accepted |
67 |
|
* socket. The given socket must be a socket created from accept(2). |
68 |
|
* If the sslserver context is non-null the socket will support |
69 |
|
* ssl. This method does only support TCP sockets. |
70 |
|
* @param socket The accepted socket |
71 |
|
* @param remote_host The remote host from where the socket connection |
72 |
|
* originated |
73 |
|
* @param port The localhost port number from where the connection |
74 |
|
* arrived. |
75 |
|
* @param sslserver A ssl server connection context, may be NULL |
76 |
|
* @return A Socket or NULL if an error occurred |
77 |
|
*/ |
78 |
|
Socket_T socket_create_a(int socket, const char *remote_host, |
79 |
|
int port, void *sslserver); |
80 |
|
|
81 |
|
|
82 |
|
/** |
83 |
* Destroy a Socket object. Close the socket and release allocated |
* Destroy a Socket object. Close the socket and release allocated |
84 |
* resources. |
* resources. |
85 |
* @param S A Socket object reference |
* @param S A Socket object reference |
121 |
|
|
122 |
|
|
123 |
/** |
/** |
124 |
* Get the remote host name this socket is connected to |
* Get the remote host this socket is connected to. The host is either |
125 |
|
* a host name in DNS or an IP address string. |
126 |
* @param S A Socket object |
* @param S A Socket object |
127 |
* @return The remote hostname |
* @return The remote host |
128 |
*/ |
*/ |
129 |
const char *socket_get_remote_hostname(Socket_T S); |
const char *socket_get_remote_host(Socket_T S); |
130 |
|
|
131 |
|
|
132 |
/** |
/** |