Permalink
Browse files

made ws server write operations truly asynchronous

separated WebSocket interface and implementation
introduced WebSocketFactory to allow users to better customize their websockets
  • Loading branch information...
1 parent 49b5500 commit 071f051b8fb43c94560752467b42398cd273dc0d @Davidiusdadi Davidiusdadi committed May 15, 2012
View
@@ -110,7 +110,6 @@ public void onMessage( String message ) {
public void onOpen( ServerHandshake handshake ) {
ta.append( "You are connected to ChatServer: " + getURI() + "\n" );
ta.setCaretPosition( ta.getDocument().getLength() );
- send( "\0" );
}
@Override
View
@@ -26,7 +26,7 @@ public ChatServer( InetSocketAddress address ) {
@Override
public void onOpen( WebSocket conn, ClientHandshake handshake ) {
try {
- this.sendToAll( "\0" );
+ this.sendToAll( "new connection" );
} catch ( InterruptedException ex ) {
ex.printStackTrace();
}
Oops, something went wrong.

0 comments on commit 071f051

Please sign in to comment.