Package org.iremake.common.network.messages

Examples of org.iremake.common.network.messages.LoginData


                client.disconnect(null);
                return true;
               
            case GEN_LOGIN:
                // a login attempt, compared version and if successful, add to lobby               
                LoginData data = (LoginData) message.getAttachment();
                // test version
                if (Option.General_Version.get().equals(data.getVersion())) {
                    // set the new name
                    client.setName(data.getClientName());
                    // add some handlers
                    client.addHandler(new LobbyHandler());
                    // put client in lobby
                    client.setState(ServerClientState.LOBBY);
                    // send a LobbyOverviewMessage
View Full Code Here


                    public void actionPerformed(ActionEvent e) {
                        if (RemoteClient.CONTEXT.start(ipField.getText())) {
                            // we connected
                            FrameManager.getInstance().scheduleInfoMessage("Connection successful");
                            RemoteClient.CONTEXT.addHandler(new LobbyHandler(chatHistory.getDocument(), lobbyListModel));
                            RemoteClient.CONTEXT.send(Message.GEN_LOGIN.createNew(new LoginData(Option.General_Version.get(), aliasField.getText())));
                        } else {
                            // we couldn't connect
                            FrameManager.getInstance().scheduleInfoMessage("Could not connect!");
                        }
                        // close dialog in any case
View Full Code Here

TOP

Related Classes of org.iremake.common.network.messages.LoginData

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.