30 |
|
|
31 |
|
//---CONSTRUCTORS--- |
32 |
|
|
33 |
+ |
/** |
34 |
+ |
* Construct a new HostInit. |
35 |
+ |
* |
36 |
+ |
* @param socket The socket to which the host is connected |
37 |
+ |
*/ |
38 |
|
public HostInit(Socket socket) throws IOException { |
39 |
|
_socket = socket; |
40 |
+ |
// setup reader & writer |
41 |
|
_socketIn = new BufferedReader(new InputStreamReader(_socket.getInputStream())); |
42 |
|
_socketOut = new PrintWriter(_socket.getOutputStream()); |
43 |
|
_logger.write(toString(), Logger.SYSINIT, "created"); |
45 |
|
|
46 |
|
//---PUBLIC METHODS--- |
47 |
|
|
48 |
+ |
/** |
49 |
+ |
* Main method in this class, which handles communicating with |
50 |
+ |
* the host to determine it's setup. |
51 |
+ |
*/ |
52 |
|
public void run() { |
53 |
|
try { |
54 |
|
String inBound = _socketIn.readLine(); |