Skip to content

Commit 7cca372

Browse files
authored
make MAX_BUFFER_SIZE logic to same as posix (#8107)
1 parent 78a6a53 commit 7cca372

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

addons/ofxOsc/libs/oscpack/src/ip/win32/UdpSocket.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,11 @@ class SocketReceiveMultiplexer::Implementation{
447447
timerQueue_.push_back( std::make_pair( currentTimeMs + i->initialDelayMs, *i ) );
448448
std::sort( timerQueue_.begin(), timerQueue_.end(), CompareScheduledTimerCalls );
449449

450-
const int MAX_BUFFER_SIZE = 4098;
450+
unsigned long maxSize = UdpSocket::GetUdpBufferSize();
451+
if( maxSize == 0 ) {
452+
maxSize = 4098;
453+
}
454+
const unsigned long MAX_BUFFER_SIZE = maxSize;
451455
char *data = new char[ MAX_BUFFER_SIZE ];
452456
IpEndpointName remoteEndpoint;
453457

0 commit comments

Comments
 (0)