common Send method

This commit is contained in:
orignal 2014-04-18 19:27:39 -04:00
parent 75ddb26c18
commit 31295a663b
2 changed files with 36 additions and 33 deletions

View file

@ -79,7 +79,7 @@ namespace stream
bool IsEstablished () const { return m_SendStreamID; };
void HandleNextPacket (Packet * packet);
size_t Send (uint8_t * buf, size_t len, int timeout); // timeout in seconds
size_t Send (const uint8_t * buf, size_t len, int timeout); // timeout in seconds
template<typename Buffer, typename ReceiveHandler>
void AsyncReceive (const Buffer& buffer, ReceiveHandler handler, int timeout = 0);
@ -90,7 +90,6 @@ namespace stream
private:
void ConnectAndSend (uint8_t * buf, size_t len);
void SendQuickAck ();
bool SendPacket (Packet * packet);
bool SendPacket (const uint8_t * buf, size_t len);