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() { public void run() {
try { try {
// Allow looping in the loop and create a socket server // Allow looping in the loop and create a socket server
SSLServerSocketFactory sslserversocketfactory = (SSLServerSocketFactory) SSLServerSocketFactory SSLServerSocketFactory sslserversocketfactory = (SSLServerSocketFactory) SSLServerSocketFactory.getDefault();
.getDefault(); this.server = sslserversocketfactory.createServerSocket(this.server_port);
SSLServerSocket sslserversocket = (SSLServerSocket) sslserversocketfactory
.createServerSocket(this.server_port);
this.server_run = true; this.server_run = true;
this.server = sslserversocket;
while (this.server_run) { while (this.server_run) {
// Accepting connection requests (blocking) // Accepting connection requests (blocking)
Socket client = this.server.accept(); Socket client = this.server.accept();