Skip to content

Commit cb188a7

Browse files
committed
Adjusted examples
Removed socket.shutdownOutput due to no implementation in SSLSocket
1 parent 05b9c25 commit cb188a7

File tree

5 files changed

+4
-5
lines changed

5 files changed

+4
-5
lines changed

src/main/example/ChatServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public static void main( String[] args ) throws InterruptedException , IOExcepti
9494
String in = sysin.readLine();
9595
s.broadcast( in );
9696
if( in.equals( "exit" ) ) {
97-
s.stop();
97+
s.stop(1000);
9898
break;
9999
}
100100
}

src/main/example/ExampleClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public void onError( Exception ex ) {
6767
}
6868

6969
public static void main( String[] args ) throws URISyntaxException {
70-
ExampleClient c = new ExampleClient( new URI( "ws://localhost:8887" ), new Draft_6455() ); // more about drafts here: http://github.com/TooTallNate/Java-WebSocket/wiki/Drafts
70+
ExampleClient c = new ExampleClient( new URI( "ws://localhost:8887" )); // more about drafts here: http://github.com/TooTallNate/Java-WebSocket/wiki/Drafts
7171
c.connect();
7272
}
7373

src/main/example/FragmentedFramesExample.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public class FragmentedFramesExample {
4747
public static void main( String[] args ) throws URISyntaxException , IOException , InterruptedException {
4848
// WebSocketImpl.DEBUG = true; // will give extra output
4949

50-
WebSocketClient websocket = new ExampleClient( new URI( "ws://localhost:8887" ), new Draft_6455() ); // Draft_6455 is implementation of rfc6455
50+
WebSocketClient websocket = new ExampleClient( new URI( "ws://localhost:8887" ));
5151
if( !websocket.connectBlocking() ) {
5252
System.err.println( "Could not connect to the server." );
5353
return;

src/main/example/ServerRejectHandshakeExample.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public static void main( String[] args ) throws InterruptedException , IOExcepti
8282
String in = sysin.readLine();
8383
s.broadcast( in );
8484
if( in.equals( "exit" ) ) {
85-
s.stop();
85+
s.stop(1000);
8686
break;
8787
}
8888
}

src/main/java/org/java_websocket/client/WebSocketClient.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,6 @@ public void run() {
481481
private void closeOutputAndSocket() {
482482
try {
483483
if( socket != null ) {
484-
socket.shutdownOutput();
485484
socket.close();
486485
}
487486
} catch ( IOException ex ) {

0 commit comments

Comments
 (0)