All Packages Class Hierarchy This Package Previous Next Index
Class webwisdom.tango.fake.TServerFake
java.lang.Object
|
+----webwisdom.tango.fake.TServerFake
- public class TServerFake
- extends Object
Simple server broadcasting messages from clients to all other clients.
Clients are instances of FakeTangoAgent.
Run with parameter being a port number.
Console communicates have two formats:
- FTS: message; or
- FTS.[clientThread]: message.
- See Also:
- FakeTangoAgent
-
DATA
-
-
MASTER
-
-
SLAVE
-
-
TServerFake(int)
- Anchors at the given port.
-
main(String[])
- Creates and starts the server at the port given the first parameter.
-
run()
- Starts the server.
-
toString()
-
DATA
public static final byte DATA
MASTER
public static final byte MASTER
SLAVE
public static final byte SLAVE
TServerFake
public TServerFake(int port) throws IOException
- Anchors at the given port.
- Parameters:
- port - port at which the server is to listen for clients
- Throws: IOException
- if cannot start service at given port
run
public void run() throws IOException
- Starts the server.
Servers accepts connections from clients
and creates new thread for each client.
- Throws: IOException
- not caught system exceptions
toString
public String toString()
- Overrides:
- toString in class Object
main
public static void main(String args[])
- Creates and starts the server at the port given the first parameter.
All Packages Class Hierarchy This Package Previous Next Index