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.

Variable Index

 o s
A Socket connection to the client.

Method Index

 o main(String[])
Opens a ServerSocket that accepts client connections and launches MTEchoServer threads to process these.
 o 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.

Variables

 o s
  protected Socket s
A Socket connection to the client.

Methods

 o 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
 o 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