|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface NetTransmitter
Transmitter which transmits or send low level packets using the link layer of the open network interface.
| Method Summary | |
|---|---|
void |
send(java.nio.ByteBuffer buffer)
Transmits the specified buffer using the currently open network interface. |
void |
send(java.nio.ByteBuffer buffer,
int count)
Transmits the specified buffer using the currently open network interface. |
void |
send(java.util.Queue<java.nio.ByteBuffer> queue)
Transmits the specified queue with buffers in it using the currently open network interface. |
| Method Detail |
|---|
void send(java.nio.ByteBuffer buffer)
throws java.io.IOException
Transmits the specified buffer using the currently open network interface. The transmition is done using link layer. the supplied buffer must contain valid data-link header otherwise an error will occur.
The buffer position and limit properties mark the area of the buffer that will be transmitted.
buffer - the buffer to transmit
java.io.IOException - any IO errors during the transmittion of the buffer
void send(java.nio.ByteBuffer buffer,
int count)
throws java.io.IOException
Transmits the specified buffer using the currently open network interface. The transmition is done using link layer. the supplied buffer must contain valid data-link header otherwise an error will occur.
The buffer position and limit properties mark the area of the buffer that will be transmitted.
buffer - the buffer to transmitcount - Number of times the packet is to be repeatadily resent. The packet
will be sent count number of times, as quickly as the kernel and the
hardware are capable of. This is a very efficient way to generate
large number of packets on a network for testing purposes.
java.io.IOException - any IO errors during the transmittion of the buffer
void send(java.util.Queue<java.nio.ByteBuffer> queue)
throws java.io.IOException
Transmits the specified queue with buffers in it using the currently open network interface. The transmition is done using link layer and raw packets. The supplied buffers on the queue must contain valid data-link headers.
Each buffer's property position and limit on the queue, mark the area
of the buffer that will be transmitted, one buffer after the other.
The order of the buffers is retrieved using Queue.poll()
method.
Note that it is much more efficient to transmit a set of packets
queue - queue of buffers to be transmitted
java.io.IOException - any IO errors
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||