Package net.i2p.sam
Interface SAMDatagramReceiver
- All Known Implementing Classes:
PrimarySession,SAMv1Handler,SAMv2Handler,SAMv3DatagramSession,SAMv3Handler
interface SAMDatagramReceiver
Interface for sending raw data to a SAM client
-
Method Summary
Modifier and TypeMethodDescriptionvoidreceiveDatagramBytes(Destination sender, byte[] data, int proto, int fromPort, int toPort) Send a byte array to a SAM client.voidreceiveDatagramBytes(Hash sender, byte[] data, int proto, int fromPort, int toPort) Send a byte array to a SAM client.voidStop receiving data.
-
Method Details
-
receiveDatagramBytes
void receiveDatagramBytes(Destination sender, byte[] data, int proto, int fromPort, int toPort) throws IOException Send a byte array to a SAM client.- Parameters:
sender- Destinationdata- Byte array to be receivedproto- I2CP protocolfromPort- I2CP from porttoPort- I2CP to port- Throws:
IOException
-
receiveDatagramBytes
void receiveDatagramBytes(Hash sender, byte[] data, int proto, int fromPort, int toPort) throws IOException Send a byte array to a SAM client. Only for Datagram3, where the sender Destination is not available, only the hash.- Parameters:
sender- Hashdata- Byte array to be receivedproto- I2CP protocol, almost certainly 20 (DATAGRAM3)fromPort- I2CP from porttoPort- I2CP to port- Throws:
IOException- Since:
- 0.9.68
-
stopDatagramReceiving
void stopDatagramReceiving()Stop receiving data.
-