mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
send datagram
This commit is contained in:
parent
65719ae645
commit
61d36ea8c3
2 changed files with 73 additions and 1 deletions
12
Datagram.h
12
Datagram.h
|
@ -2,6 +2,8 @@
|
|||
#define DATAGRAM_H__
|
||||
|
||||
#include <inttypes.h>
|
||||
#include "LeaseSet.h"
|
||||
#include "I2NPProtocol.h"
|
||||
|
||||
namespace i2p
|
||||
{
|
||||
|
@ -16,14 +18,22 @@ namespace datagram
|
|||
{
|
||||
public:
|
||||
|
||||
DatagramDestination (i2p::client::ClientDestination& owner): m_Owner (owner) {};
|
||||
DatagramDestination (i2p::client::ClientDestination& owner);
|
||||
~DatagramDestination () {};
|
||||
|
||||
void SendDatagramTo (const uint8_t * payload, size_t len, const i2p::data::LeaseSet& remote);
|
||||
void HandleDataMessagePayload (const uint8_t * buf, size_t len);
|
||||
|
||||
private:
|
||||
|
||||
I2NPMessage * CreateDataMessage (const uint8_t * payload, size_t len);
|
||||
|
||||
private:
|
||||
|
||||
i2p::client::ClientDestination& m_Owner;
|
||||
uint8_t m_OutgoingBuffer[MAX_DATAGRAM_SIZE];
|
||||
uint8_t * m_Signature, * m_Payload;
|
||||
size_t m_HeaderLen;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue