|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.UCL.xmiddle.controller.UDPSender
UDPSender.java
UDPSender sends Data
packets through the network to a
specified UDPHost
which is defined upon creation. It
uses DatagramSockets (UDP) to do the sending. It also splits data
to a given segment size before sending...
Created: Wed Aug 1 14:18:41 2001
Constructor Summary | |
UDPSender(java.net.DatagramSocket socket,
UDPHost host,
int port)
Creates a new UDPSender instance. |
Method Summary | |
void |
close()
Closes the datagram socket. |
int |
getSegment()
Returns the maximum segment size of the data. |
boolean |
rawSend(Data packet)
Sends the given packet to the remote host without negotiating any packet size information |
boolean |
send(Data packet)
Sends a data packet to the remote host |
void |
setSegment(int segment)
Sets the maximum segment size of the data |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public UDPSender(java.net.DatagramSocket socket, UDPHost host, int port)
UDPSender
instance.
socket
- The datagram socket via which the data are to be
sent.host
- The host to which the data are to be sentport
- the UDP port to which the packets are boundMethod Detail |
public void close()
close
in interface Sender
public int getSegment()
getSegment
in interface Sender
public void setSegment(int segment)
setSegment
in interface Sender
segment
- public boolean send(Data packet)
send
in interface Sender
packet
- The data packet
public boolean rawSend(Data packet)
rawSend
in interface Sender
packet
- The packet to send
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |