renamed bytesQueued() to queued()
This commit is contained in:
parent
0eb14c9756
commit
b26058f3e2
|
|
@ -122,12 +122,6 @@ public:
|
||||||
*/
|
*/
|
||||||
int fileno() const;
|
int fileno() const;
|
||||||
|
|
||||||
/**
|
|
||||||
* The number of outgoing bytes queued on this connection.
|
|
||||||
* @return size_t
|
|
||||||
*/
|
|
||||||
size_t bytesQueued() const;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Process the TCP connection
|
* Process the TCP connection
|
||||||
*
|
*
|
||||||
|
|
@ -161,7 +155,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The max frame size
|
* The max frame size. Useful if you set up a buffer to parse incoming data: it does not have to exceed this size.
|
||||||
* @return uint32_t
|
* @return uint32_t
|
||||||
*/
|
*/
|
||||||
uint32_t maxFrame() const
|
uint32_t maxFrame() const
|
||||||
|
|
@ -170,7 +164,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The number of bytes that can best be passed to the next call to the parse() method
|
* The number of bytes that can best be passed to the next call to the parse() method.
|
||||||
* @return uint32_t
|
* @return uint32_t
|
||||||
*/
|
*/
|
||||||
uint32_t expected() const
|
uint32_t expected() const
|
||||||
|
|
@ -179,7 +173,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the amount of channels this connection has
|
* Return the number of channels this connection has.
|
||||||
* @return std::size_t
|
* @return std::size_t
|
||||||
*/
|
*/
|
||||||
std::size_t channels() const
|
std::size_t channels() const
|
||||||
|
|
@ -188,6 +182,12 @@ public:
|
||||||
return _connection.channels();
|
return _connection.channels();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The number of outgoing bytes queued on this connection.
|
||||||
|
* @return std::size_t
|
||||||
|
*/
|
||||||
|
std::size_t queued() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send a heartbeat
|
* Send a heartbeat
|
||||||
* @return bool
|
* @return bool
|
||||||
|
|
|
||||||
|
|
@ -337,10 +337,10 @@ public:
|
||||||
virtual int fileno() const override { return _socket; }
|
virtual int fileno() const override { return _socket; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The number of outgoing bytes queued on this connection.
|
* Number of bytes in the outgoing buffer
|
||||||
* @return size_t
|
* @return std::size_t
|
||||||
*/
|
*/
|
||||||
virtual size_t bytesQueued() const { return _out.size(); }
|
virtual std::size_t queued() const override { return _out.size(); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Process the filedescriptor in the object
|
* Process the filedescriptor in the object
|
||||||
|
|
|
||||||
|
|
@ -172,6 +172,12 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual int fileno() const override { return _socket; }
|
virtual int fileno() const override { return _socket; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Number of bytes in the outgoing buffer
|
||||||
|
* @return std::size_t
|
||||||
|
*/
|
||||||
|
virtual std::size_t queued() const override { return _out.size(); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Process the filedescriptor in the object
|
* Process the filedescriptor in the object
|
||||||
* @param monitor Object to check if connection still exists
|
* @param monitor Object to check if connection still exists
|
||||||
|
|
|
||||||
|
|
@ -159,10 +159,10 @@ public:
|
||||||
virtual int fileno() const override { return _socket; }
|
virtual int fileno() const override { return _socket; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The number of outgoing bytes queued on this connection.
|
* Number of bytes in the outgoing buffer
|
||||||
* @return size_t
|
* @return std::size_t
|
||||||
*/
|
*/
|
||||||
virtual size_t bytesQueued() const { return _out.size(); }
|
virtual std::size_t queued() const override { return _out.size(); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Process the filedescriptor in the object
|
* Process the filedescriptor in the object
|
||||||
|
|
|
||||||
|
|
@ -45,11 +45,11 @@ int TcpConnection::fileno() const
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The number of outgoing bytes queued on this connection.
|
* The number of outgoing bytes queued on this connection.
|
||||||
* @return size_t
|
* @return std::size_t
|
||||||
*/
|
*/
|
||||||
size_t TcpConnection::bytesQueued() const
|
std::size_t TcpConnection::queued() const
|
||||||
{
|
{
|
||||||
return _state->bytesQueued();
|
return _state->queued();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -184,6 +184,12 @@ public:
|
||||||
_thread.join();
|
_thread.join();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Number of bytes in the outgoing buffer
|
||||||
|
* @return std::size_t
|
||||||
|
*/
|
||||||
|
virtual std::size_t queued() const override { return _buffer.size(); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Proceed to the next state
|
* Proceed to the next state
|
||||||
* @return TcpState *
|
* @return TcpState *
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
* Base class / interface of the various states of the TCP connection
|
* Base class / interface of the various states of the TCP connection
|
||||||
*
|
*
|
||||||
* @author Emiel Bruijntjes <emiel.bruijntjes@copernica.com>
|
* @author Emiel Bruijntjes <emiel.bruijntjes@copernica.com>
|
||||||
* @copyright 2015 - 2016 Copernica BV
|
* @copyright 2015 - 2018 Copernica BV
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -67,7 +67,7 @@ public:
|
||||||
* The number of outgoing bytes queued on this connection.
|
* The number of outgoing bytes queued on this connection.
|
||||||
* @return size_t
|
* @return size_t
|
||||||
*/
|
*/
|
||||||
virtual size_t bytesQueued() const { return 0; }
|
virtual std::size_t queued() const { return 0; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Process the filedescriptor in the object
|
* Process the filedescriptor in the object
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue