Package chatown

Examples of chatown.ClientIdentityMsg


    _eventServerConnection.fireEvent(new SeverConnectionEvent(this, true));
   
    try { // send nickname to server and ID if already allocated from before
      _out = new ObjectOutputStream(_socket.getOutputStream());
      _out.flush();     
      _out.writeObject(new ClientIdentityMsg(_clientNickname, _clientID));
    } catch (IOException e) {
      //JOptionPane.showMessageDialog(null, "Error in connection to server");
      e.printStackTrace();     

      try {
View Full Code Here


      return;
   
       
    if (clientObj instanceof ClientIdentityMsg) { // new client
     
      ClientIdentityMsg clientIdentity = (ClientIdentityMsg)clientObj;
      String nickName = clientIdentity.get_nickname();
      System.out.println("nick name : " + nickName);
     
      if (clientIdentity.get_ID() != null) {
        _clientID = clientIdentity.get_ID();
      } else {
     
        Random generator = new Random();     
        Integer clientIDInt = generator.nextInt(Integer.MAX_VALUE);
        
View Full Code Here

TOP

Related Classes of chatown.ClientIdentityMsg

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.