|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Server_network_interface
Field Summary | |
---|---|
static int |
EAST
A constant identifying one controller. |
static int |
WEST
A constant identifying one controller. |
Method Summary | |
---|---|
int |
get_line(int mask,
java.lang.StringBuffer str_buf)
Attempt to read one line from either client. |
void |
send_line(java.lang.String line,
int which)
Send one line to a client. |
Field Detail |
---|
static final int WEST
static final int EAST
Method Detail |
---|
void send_line(java.lang.String line, int which) throws java.io.IOException
line
- this should end in a newline.which
- this should be server_network_layer.WEST or server_network_layer.EAST
java.io.IOException
- if the line can not be sent.int get_line(int mask, java.lang.StringBuffer str_buf) throws java.io.IOException
The bytes read are converted to a string according to ASCII encoding
Byte value 10 is used to mark the end of lines.
mask
- indicates where the line should come from.
It may be, WEST, EAST, or WEST|EAST to indicate either is ok.str_buf
- a string buffer onto which the line will be appended if
a line is read. Typically you would pass a new string buffer.
java.io.IOException
- if trouble reading the line.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |