Skip to content

Commit

Permalink
Merge pull request #591 from marci4/master
Browse files Browse the repository at this point in the history
Adjusted examples
  • Loading branch information
marci4 authored Oct 26, 2017
2 parents 7df35ff + cb188a7 commit 980cd0a
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/main/example/ChatServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public static void main( String[] args ) throws InterruptedException , IOExcepti
String in = sysin.readLine();
s.broadcast( in );
if( in.equals( "exit" ) ) {
s.stop();
s.stop(1000);
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/example/ExampleClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public void onError( Exception ex ) {
}

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

Expand Down
2 changes: 1 addition & 1 deletion src/main/example/FragmentedFramesExample.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class FragmentedFramesExample {
public static void main( String[] args ) throws URISyntaxException , IOException , InterruptedException {
// WebSocketImpl.DEBUG = true; // will give extra output

WebSocketClient websocket = new ExampleClient( new URI( "ws://localhost:8887" ), new Draft_6455() ); // Draft_6455 is implementation of rfc6455
WebSocketClient websocket = new ExampleClient( new URI( "ws://localhost:8887" ));
if( !websocket.connectBlocking() ) {
System.err.println( "Could not connect to the server." );
return;
Expand Down
2 changes: 1 addition & 1 deletion src/main/example/ServerRejectHandshakeExample.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public static void main( String[] args ) throws InterruptedException , IOExcepti
String in = sysin.readLine();
s.broadcast( in );
if( in.equals( "exit" ) ) {
s.stop();
s.stop(1000);
break;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,6 @@ public void run() {
private void closeOutputAndSocket() {
try {
if( socket != null ) {
socket.shutdownOutput();
socket.close();
}
} catch ( IOException ex ) {
Expand Down

0 comments on commit 980cd0a

Please sign in to comment.