36 |
|
* @param port The port that the server will listen on. |
37 |
|
* @param queue A Queue to utilise |
38 |
|
*/ |
39 |
< |
public TCPClientListener(int port, Queue queue) { |
39 |
> |
public TCPClientListener(int port, PacketSorter ps) { |
40 |
|
_port = port; |
41 |
< |
_queue = queue; |
41 |
> |
_ps = ps; |
42 |
|
_logger.write(toString(), Logger.SYSINIT, "started"); |
43 |
|
} |
44 |
|
|
89 |
|
if(run){ |
90 |
|
try { |
91 |
|
// Setup the HostInit so it can carry on communications with the host |
92 |
< |
TCPControlHandler ctl = new TCPControlHandler(hostSocket, _queue); |
92 |
> |
TCPControlHandler ctl = new TCPControlHandler(hostSocket, _ps); |
93 |
|
ctl.start(); |
94 |
|
} catch (IOException e) { |
95 |
|
_logger.write(toString(), Logger.ERROR, e.toString()); |
145 |
|
private int _port; |
146 |
|
|
147 |
|
/** |
148 |
< |
* A reference to the Queue. |
148 |
> |
* A reference to the PacketSorter. |
149 |
|
*/ |
150 |
< |
private Queue _queue; |
150 |
> |
private PacketSorter _ps; |
151 |
|
|
152 |
|
//---STATIC ATTRIBUTES--- |
153 |
|
|