Make login process async, hand cherry-picked
This commit is contained in:
1 parent
e9a56cf409
commit
931eaff000
18 files changed
+711
-385
No files matched your search
@@ -84,9 +84,9 @@ public:
|
||||
// Ensures there's "some" free space, make sure to call Normalize() before this
|
||||
void EnsureFreeSpace()
|
||||
{
|
||||
// Double the size of the buffer if it's already full
|
||||
// resize buffer if it's already full
|
||||
if (GetRemainingSpace() == 0)
|
||||
_storage.resize(_storage.size() * 2);
|
||||
_storage.resize(_storage.size() * 3 / 2);
|
||||
}
|
||||
|
||||
void Write(void const* data, std::size_t size)
|
||||
|
||||
@@ -160,6 +160,8 @@ protected:
|
||||
MessageBuffer _writeBuffer;
|
||||
#endif
|
||||
|
||||
boost::asio::io_service& io_service() { return _socket.get_io_service(); }
|
||||
|
||||
private:
|
||||
void ReadHandlerInternal(boost::system::error_code error, size_t transferredBytes)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user