26 |
public void open(Session session, EndpointConfig conf) { |
public void open(Session session, EndpointConfig conf) { |
27 |
String guestNick = "Guest-" + rand.nextInt(); |
String guestNick = "Guest-" + rand.nextInt(); |
28 |
|
|
29 |
broadcastMessage(guestNick + " has joined the chat"); |
broadcastMessage( "*** " + guestNick + " has joined the chat"); |
30 |
try { |
try { |
31 |
session.getBasicRemote().sendText( "Welcome " + guestNick); |
session.getBasicRemote().sendText( "Welcome " + guestNick); |
32 |
StringBuilder sb = new StringBuilder(); |
StringBuilder sb = new StringBuilder(); |