Class part2.chapter10.MTEchoServer
All Packages Class Hierarchy This Package Previous Next Index
Class part2.chapter10.MTEchoServer
java.lang.Object
|
+----java.lang.Thread
|
+----part2.chapter10.MTEchoServer
- public class MTEchoServer
- extends Thread
A multithreaded TCP echo server.
-
s
- A Socket connection to the client.
-
main(String[])
- Opens a ServerSocket that accepts client connections and
launches MTEchoServer threads to process these.
-
run()
- Executed by a client's handler thread, sends an initial message and
then echos all data back to the client until the connection is closed.
s
protected Socket s
- A Socket connection to the client.
run
public void run()
- Executed by a client's handler thread, sends an initial message and
then echos all data back to the client until the connection is closed.
- Overrides:
- run in class Thread
main
public static void main(String args[]) throws IOException
- Opens a ServerSocket that accepts client connections and
launches MTEchoServer threads to process these.
All Packages Class Hierarchy This Package Previous Next Index