Make the global packet_buffer owned by common (#8073)
This commit is contained in:
parent
3756872529
commit
1c31d9c83e
@ -47,6 +47,10 @@
|
|||||||
#include "strlib.hpp"
|
#include "strlib.hpp"
|
||||||
#include "timer.hpp"
|
#include "timer.hpp"
|
||||||
|
|
||||||
|
// Reuseable global packet buffer to prevent too many allocations
|
||||||
|
// Take socket.cpp::socket_max_client_packet into consideration
|
||||||
|
int8 packet_buffer[UINT16_MAX];
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
#if defined(WIN32)
|
#if defined(WIN32)
|
||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
@ -201,7 +201,7 @@ void send_shortlist_do_sends();
|
|||||||
|
|
||||||
// Reuseable global packet buffer to prevent too many allocations
|
// Reuseable global packet buffer to prevent too many allocations
|
||||||
// Take socket.cpp::socket_max_client_packet into consideration
|
// Take socket.cpp::socket_max_client_packet into consideration
|
||||||
static int8 packet_buffer[UINT16_MAX];
|
extern int8 packet_buffer[UINT16_MAX];
|
||||||
|
|
||||||
template <typename P>
|
template <typename P>
|
||||||
bool socket_send( int fd, P& packet ){
|
bool socket_send( int fd, P& packet ){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user