Skip to content

ofxOscReceiver: win32 implementation: shadow posix changes #7979

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions addons/ofxOsc/libs/oscpack/src/ip/win32/UdpSocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
#include <cstring> // for memset
#include <stdexcept>
#include <vector>
#include <atomic>

#include "ip/UdpSocket.h" // usually I'd include the module header first
// but this is causing conflicts with BCB4 due to
Expand Down Expand Up @@ -353,7 +354,7 @@ class SocketReceiveMultiplexer::Implementation{
std::vector< std::pair< PacketListener*, UdpSocket* > > socketListeners_;
std::vector< AttachedTimerListener > timerListeners_;

volatile bool break_;
std::atomic<bool> break_ { false };
HANDLE breakEvent_;

double GetCurrentTimeMs() const
Expand Down Expand Up @@ -418,8 +419,6 @@ class SocketReceiveMultiplexer::Implementation{

void Run()
{
break_ = false;

// prepare the window events which we use to wake up on incoming data
// we use this instead of select() primarily to support the AsyncBreak()
// mechanism.
Expand Down Expand Up @@ -508,6 +507,7 @@ class SocketReceiveMultiplexer::Implementation{
unsigned long enableNonblocking = 0;
ioctlsocket( i->second->impl_->Socket(), FIONBIO, &enableNonblocking ); // make the socket blocking again
}
break_ = false;
}

void Break()
Expand Down