AnthonyCosenza
asked on
UDP Instant Messaging Server
As part of the server i need a statement that will return the host name that is given by the client as well as the port of the client the other client asks for.
Here is the snipit of wat i hav so far..
// Part of if statement to handle "where" command
} else if (received.startsWith("wher e")) {
String host = st.nextToken();
retMes = "@"+host+":"+userport;
wat needs to go in the middle??
Here is the snipit of wat i hav so far..
// Part of if statement to handle "where" command
} else if (received.startsWith("wher
String host = st.nextToken();
retMes = "@"+host+":"+userport;
wat needs to go in the middle??
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
the way this part works:
1. a client sends a who <username> to server (username bein another client)
2. server looks through to get the host name
3. returns @host:port back to the first client (where host and port are details of the second client)
hope that clears it up
1. a client sends a who <username> to server (username bein another client)
2. server looks through to get the host name
3. returns @host:port back to the first client (where host and port are details of the second client)
hope that clears it up
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
how would this be done??
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
there is no next token....
all i hav is the client name to get the port number of that client with