SSL : terminé

This commit is contained in:
Maximilien LEDOUX 2022-03-09 12:11:14 +01:00
parent 9df754f061
commit 63e4c7255d

View File

@ -41,12 +41,9 @@ public class UnicastServerListener implements Runnable {
public void run() {
try {
// Allow looping in the loop and create a socket server
SSLServerSocketFactory sslserversocketfactory = (SSLServerSocketFactory) SSLServerSocketFactory
.getDefault();
SSLServerSocket sslserversocket = (SSLServerSocket) sslserversocketfactory
.createServerSocket(this.server_port);
SSLServerSocketFactory sslserversocketfactory = (SSLServerSocketFactory) SSLServerSocketFactory.getDefault();
this.server = sslserversocketfactory.createServerSocket(this.server_port);
this.server_run = true;
this.server = sslserversocket;
while (this.server_run) {
// Accepting connection requests (blocking)
Socket client = this.server.accept();