|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnachos.machine.Network
public class Network
Network that provides ordered, reliable delivery of limited-size packets to other machines on the nachos network. Reliable means that packets are not lost or corrupted. IMPORTANT: All of the processes corresponding to nachos machines on a single nachos network must run on the same actual host (computer). The nachos network is implemented using UDP, so in principle it is unreliable. In practice, UDP is very reliable when the communicating processes run on the same host, provided we don't flood it with large bursts of messages that cause it to run out of buffers.
Field Summary | |
---|---|
static byte |
networkID
The address of the network. |
Constructor Summary | |
---|---|
Network(byte id,
InterruptHandler readAvail,
InterruptHandler writeDone)
Create a new nachos network. |
Method Summary | |
---|---|
Packet |
receive()
Return the next packet received. |
void |
send(Packet p)
Send another packet. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final byte networkID
Constructor Detail |
---|
public Network(byte id, InterruptHandler readAvail, InterruptHandler writeDone)
id
- network address of this machinereadAvail
- is the interrupt handler called when a packet
arrives from the networkwriteDone
- is the interrupt handler called when a send is
completed, indicating that it is safe to send the next packetMethod Detail |
---|
public Packet receive()
public void send(Packet p)
p
- the packet to send.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |