again trying to get host name

git-svn-id: svn://anubis/gvsu@154 45c1a28c-8058-47b2-ae61-ca45b979098e
This commit is contained in:
josh 2008-09-18 01:19:37 +00:00
parent e517d04df1
commit aa97749483

View File

@ -98,16 +98,24 @@ public class ChatClient
public void run() public void run()
{ {
myListener = new ChatClientListener(); try
myRegistrationInfo = {
new RegistrationInfo(myUserName, myListener = new ChatClientListener();
InetAddress.getLocalHost().getHostName(), myRegistrationInfo =
myListener.getPort(), new RegistrationInfo(myUserName,
true); InetAddress.getLocalHost().getHostName(),
if (!register()) myListener.getPort(),
{ true);
return; if (!register())
} {
return;
}
}
catch (Exception e)
{
e.printStackTrace();
return;
}
/* Start a thread to listen for connections in */ /* Start a thread to listen for connections in */
myListenThread = new Thread(myListener); myListenThread = new Thread(myListener);