mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 19:27:49 +02:00
Initial SAM cleanup
This commit is contained in:
parent
fa154cc4d6
commit
4643c92d33
6 changed files with 118 additions and 153 deletions
|
@ -165,6 +165,9 @@ namespace stream
|
|||
void AsyncReceive (const Buffer& buffer, ReceiveHandler handler, int timeout = 0);
|
||||
size_t ReadSome (uint8_t * buf, size_t len) { return ConcatenatePackets (buf, len); };
|
||||
|
||||
void AsyncClose() { m_Service.post(std::bind(&Stream::Close, shared_from_this())); };
|
||||
|
||||
/** only call close from destination thread, use Stream::AsyncClose for other threads */
|
||||
void Close ();
|
||||
void Cancel () { m_ReceiveTimer.cancel (); };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue