diff options
Diffstat (limited to 'src/Net/ServerConnection.h')
-rw-r--r-- | src/Net/ServerConnection.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Net/ServerConnection.h b/src/Net/ServerConnection.h index a1e839f..09f9d6b 100644 --- a/src/Net/ServerConnection.h +++ b/src/Net/ServerConnection.h @@ -21,6 +21,7 @@ #define MAD_NET_SERVERCONNECTION_H_ #include "Connection.h" +#include "ConnectionException.h" #include <string> namespace Mad { @@ -44,7 +45,10 @@ class ServerConnection : public Connection { public: ServerConnection() : connected(false) { gnutls_anon_allocate_server_credentials(&anoncred); + gnutls_dh_params_init(&dh_params); + gnutls_dh_params_generate2(dh_params, 768); + gnutls_anon_set_server_dh_params(anoncred, dh_params); } virtual ~ServerConnection() { @@ -55,9 +59,7 @@ class ServerConnection : public Connection { gnutls_anon_free_server_credentials(anoncred); } - bool loadDHParams(const std::string &file); - - bool listen(const IPAddress &address); + void listen(const IPAddress &address) throw(ConnectionException); void disconnect(); virtual bool dataPending(); |