|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.rit.m2mp.Channel
edu.rit.m2mp.DaemonChannel
public class DaemonChannel
Class DaemonChannel provides an M2MP Channel
for
communicating between an M2MP client process and the M2MP Daemon process.
When there is more than one M2MP client process running on a device, a
separate M2MP Daemon process must also be run on the device. The clients send
packets to the daemon (via a DaemonChannel), and the daemon forwards the
packets to the other clients and to the external network (via some other
channel). The daemon also receives packets from the external network and
forwards the packets to the clients.
Field Summary |
---|
Fields inherited from class edu.rit.m2mp.Channel |
---|
myPacketPool |
Constructor Summary | |
---|---|
DaemonChannel(PacketPool thePacketPool,
Socket theSocket)
Construct a new daemon channel. |
Method Summary | |
---|---|
void |
closeSocket()
Close down socket and streams. |
Packet |
receivePacket()
Receive an M2MP packet via this daemon channel. |
void |
transmitPacket(Packet thePacket)
Send the given M2MP packet via this daemon channel. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DaemonChannel(PacketPool thePacketPool, Socket theSocket) throws IOException
Packet
objects
from the given
PacketPool
.
thePacketPool
- Packet pool.theSocket
- Socket to use for communication.
NullPointerException
- (unchecked exception) Thrown if thePacketPool is null.
IOException
- Thrown if an I/O error occurred.Method Detail |
---|
public Packet receivePacket() throws IOException
receivePacket
in class Channel
IOException
- Thrown if an I/O error occurred.public void transmitPacket(Packet thePacket) throws IOException
transmitPacket
in class Channel
thePacket
- M2MP packet to be sent.
IOException
- Thrown if an I/O error occurred.public void closeSocket()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |