Skip to content

Commit cd87e71

Browse files
committed
renamed SSLExample.java to SSLServerExample.java
1 parent 9e762ad commit cd87e71

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import java.io.IOException;
44
import java.net.Socket;
55
import java.nio.channels.ByteChannel;
6-
import java.nio.channels.SocketChannel;
6+
import java.nio.channels.SelectionKey;
77
import java.security.KeyStore;
88
import java.util.List;
99

@@ -12,14 +12,14 @@
1212
import javax.net.ssl.SSLEngine;
1313
import javax.net.ssl.TrustManagerFactory;
1414

15-
import org.java_websocket.SSLSocketChannel;
15+
import org.java_websocket.SSLSocketChannel2;
1616
import org.java_websocket.WebSocket;
1717
import org.java_websocket.WebSocketAdapter;
1818
import org.java_websocket.WebSocketImpl;
1919
import org.java_websocket.drafts.Draft;
2020
import org.java_websocket.server.WebSocketServer;
2121

22-
public class SSLExample {
22+
public class SSLServerExample {
2323

2424
/*
2525
* Keystore with certificate created like so (in JKS format):
@@ -64,10 +64,10 @@ class SSLWebSocketServerFactory implements WebSocketServer.WebSocketServerFactor
6464
}
6565

6666
@Override
67-
public ByteChannel wrapChannel( SocketChannel c ) throws IOException {
67+
public ByteChannel wrapChannel( SelectionKey c ) throws IOException {
6868
SSLEngine e = sslcontext.createSSLEngine();
6969
e.setUseClientMode( false );
70-
return new SSLSocketChannel( c, e );
70+
return new SSLSocketChannel2( c, e );
7171
}
7272

7373
@Override

0 commit comments

Comments
 (0)