Improvements
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2012-2022 Wojciech Figat. All rights reserved.
|
||||
// Copyright (c) 2012-2022 Wojciech Figat. All rights reserved.
|
||||
|
||||
#include "NetworkStream.h"
|
||||
|
||||
@@ -38,6 +38,15 @@ void NetworkStream::Initialize(uint32 minCapacity)
|
||||
_position = _buffer;
|
||||
}
|
||||
|
||||
void NetworkStream::Initialize(byte* buffer, uint32 length)
|
||||
{
|
||||
if (_allocated)
|
||||
Allocator::Free(_buffer);
|
||||
_position = _buffer = buffer;
|
||||
_length = length;
|
||||
_allocated = false;
|
||||
}
|
||||
|
||||
void NetworkStream::Flush()
|
||||
{
|
||||
// Nothing to do
|
||||
|
||||
Reference in New Issue
Block a user