Public Member Functions |
| OpenSSLServerSocket (OpenSSLParameters *parameters) |
virtual | ~OpenSSLServerSocket () |
virtual std::vector< std::string > | getSupportedCipherSuites () const |
| Gets a vector containing the names of all the cipher suites that are supported by this SSLServerSocket.Normally not all of these cipher suites will be enabled on the Socket.- Returns
- a vector containing the names of all the supported cipher suites.
|
virtual std::vector< std::string > | getSupportedProtocols () const |
| Gets a vector containing the names of all the protocols that could be enabled for this SSLServerSocket instance.- Returns
- a vector containing the names of all the supported protocols.
|
virtual std::vector< std::string > | getEnabledCipherSuites () const |
| Returns a vector containing the names of all the currently enabled Cipher Suites for this SSLServerSocket.- Returns
- vector of the names of all enabled Cipher Suites.
|
virtual void | setEnabledCipherSuites (const std::vector< std::string > &suites) |
| Sets the Cipher Suites that are to be enabled on the SSLServerSocket connection.Each of the named Cipher Suites must appear in the list of supported cipher suites for this connection or an exception will be thrown.- Parameters
-
suites | An Vector of names for all the Cipher Suites that are to be enabled. |
- Exceptions
-
IllegalArgumentException | if the vector is empty or one of the names is invalid. |
|
virtual std::vector< std::string > | getEnabledProtocols () const |
| Returns a vector containing the names of all the currently enabled Protocols for this SSLServerSocket.- Returns
- vector of the names of all enabled Protocols.
|
virtual void | setEnabledProtocols (const std::vector< std::string > &protocols) |
| Sets the Protocols that are to be enabled on the SSLServerSocket connection.Each of the named Protocols must appear in the list of supported protocols suites for this connection or an exception will be thrown.- Parameters
-
protocols | An Vector of names for all the Protocols that are to be enabled. |
- Exceptions
-
IllegalArgumentException | if the vector is empty or one of the names is invalid. |
|
virtual bool | getWantClientAuth () const |
| - Returns
- true if the Socket request client Authentication.
|
virtual void | setWantClientAuth (bool value) |
| Sets whether or not this Socket will request Client Authentication.If set to true the Socket (when used in server mode) will request that the client authenticate itself, if the client doesn't send authentication the socket will still allow negotiation to continue.- Parameters
-
value | Whether the server socket should request client authentication. |
|
virtual bool | getNeedClientAuth () const |
| - Returns
- true if the Socket requires client Authentication.
|
virtual void | setNeedClientAuth (bool value) |
| Sets whether or not this Socket will require Client Authentication.If set to true the Socket (when used in server mode) will require that the client authenticate itself, if the client doesn't send authentication the socket will not allow negotiation to continue.- Parameters
-
value | Whether the server socket should require client authentication. |
|
virtual decaf::net::Socket * | accept () |
| Listens for a connection request on the bound IPAddress and Port for this ServerSocket, the caller blocks until a connection is made.If the SO_TIMEOUT option is set this method could throw a SocketTimeoutException if the operation times out.- Returns
- a new Socket object pointer. Never returns NULL, the returned pointer is owned by the caller and must be explicitly freed by them.
- Exceptions
-
IOException | if an I/O error occurs while binding the socket. |
SocketException | if an error occurs while blocking on the accept call. |
SocketTimeoutException | if the SO_TIMEOUT option was used and the accept timed out. |
|
virtual | ~SSLServerSocket () |
| ServerSocket () |
| Creates a non-bound server socket.
|
| ServerSocket (int port) |
| Creates a new ServerSocket bound to the specified port, if the value of port is 0, then any free port is chosen.
|
| ServerSocket (int port, int backlog) |
| Creates a new ServerSocket bound to the specified port, if the value of port is 0, then any free port is chosen.
|
| ServerSocket (int port, int backlog, const InetAddress *address) |
| Creates a new ServerSocket bound to the specified port, if the value of port is 0, then any free port is chosen.
|
virtual | ~ServerSocket () |
| Releases socket handle if close() hasn't been called.
|
virtual void | bind (const std::string &host, int port) |
| Bind and listen to given local IPAddress and port, if the address is empty than a valid local address will be chosen, and if the port of 0 than an available open port will be chosen.
|
virtual void | bind (const std::string &host, int port, int backlog) |
| Bind and listen to given local IPAddress and port, if the address is empty than a valid local address will be chosen, and if the port of 0 than an available open port will be chosen.
|
virtual void | close () |
| Closes the server socket, causing any Threads blocked on an accept call to throw an Exception.
|
virtual bool | isClosed () const |
virtual bool | isBound () const |
virtual int | getReceiveBufferSize () const |
| Gets the receive buffer size for this socket, SO_RCVBUF.
|
virtual void | setReceiveBufferSize (int size) |
| Sets the receive buffer size for this socket, SO_RCVBUF.
|
virtual bool | getReuseAddress () const |
| Gets the reuse address flag, SO_REUSEADDR.
|
virtual void | setReuseAddress (bool reuse) |
| Sets the reuse address flag, SO_REUSEADDR.
|
virtual int | getSoTimeout () const |
| Gets the timeout for socket operations, SO_TIMEOUT.
|
virtual void | setSoTimeout (int timeout) |
| Sets the timeout for socket operations, SO_TIMEOUT.
|
virtual int | getLocalPort () const |
| Gets the port number on the Local machine that this ServerSocket is bound to.
|
virtual std::string | toString () const |
SSLServerSocket based on OpenSSL library code.
- Since
- 1.0