Make login process async, hand cherry-picked

This commit is contained in:
ariel- committed 2016-01-13 01:14:13 -03:00
1 parent e9a56cf409
commit 931eaff000
18 files changed
+711 -385

No files matched your search

+2 -2
View File
@@ -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)
+2
View File
@@ -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)
{