updated prog4

git-svn-id: svn://anubis/gvsu@275 45c1a28c-8058-47b2-ae61-ca45b979098e
This commit is contained in:
josh committed 2008-11-28 19:38:39 +00:00
1 parent 5bf694622e
commit 38452f6f26
3 files changed
+9 -3

No files matched your search

+2 -1
View File
@@ -326,6 +326,7 @@ public class ChatClient
{
String user = "user";
String host = "localhost";
int port = 42842;
for (int arg = 0; arg < args.length; arg++)
{
@@ -342,7 +343,7 @@ public class ChatClient
}
}
PresenceService pServ = new PresenceServiceImpl();
PresenceService pServ = new PresenceServiceImpl(host, port);
ChatClient chatClient = new ChatClient(pServ, user);
chatClient.run();
+1 -1
View File
@@ -49,7 +49,7 @@ public class ChatServer extends Application
{
// Create a component with an HTTP server connector
Component comp = new Component();
comp.getServers().add(Protocol.HTTP, 3000);
comp.getServers().add(Protocol.HTTP, 42842);
// Attach the application to the default host and start it
comp.getDefaultHost().attach("/v1", new ChatServer());
+6 -1
View File
@@ -13,8 +13,13 @@ import edu.gvsu.cis.cs656.lab4.server.RegistrationInfo;
public class PresenceServiceImpl implements PresenceService
{
public PresenceServiceImpl()
private int myPort;
private String myHost;
public PresenceServiceImpl(String host, int port)
{
myHost = host;
myPort = port;
}
/**