diff options
author | fcolin | 2009-10-15 10:26:27 +0000 |
---|---|---|
committer | fcolin | 2009-10-15 10:26:27 +0000 |
commit | 473bf59297a9c8010fb35f505c872024ae3d259d (patch) | |
tree | ba296d860b9ecda9101b76f1eea4407daa997a38 /Ivy/IvyWatcher.cxx | |
parent | 3bd1423d9bd7374c2d39f9817e3a1caa836f86e6 (diff) | |
download | ivy-cplusplus-473bf59297a9c8010fb35f505c872024ae3d259d.zip ivy-cplusplus-473bf59297a9c8010fb35f505c872024ae3d259d.tar.gz ivy-cplusplus-473bf59297a9c8010fb35f505c872024ae3d259d.tar.bz2 ivy-cplusplus-473bf59297a9c8010fb35f505c872024ae3d259d.tar.xz |
correction bug threaded IvyApplication
correction checkconnected self
Diffstat (limited to 'Ivy/IvyWatcher.cxx')
-rw-r--r-- | Ivy/IvyWatcher.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Ivy/IvyWatcher.cxx b/Ivy/IvyWatcher.cxx index 4cbf604..ab72511 100644 --- a/Ivy/IvyWatcher.cxx +++ b/Ivy/IvyWatcher.cxx @@ -15,6 +15,7 @@ IvyWatcher::IvyWatcher(Ivy * bus)
{
+ running = false;
this->bus = bus;
}
IvyWatcher::~IvyWatcher()
@@ -97,6 +98,11 @@ void IvyWatcher::start(const char *domainlist) }
// create UDP receiver
// catch exception !!!
+ // if already open then CLOSE
+ if ( running )
+ {
+ Close();
+ }
Socket(SOCK_DGRAM);
SetSockOpt( SO_REUSEADDR, &reuse, sizeof(BOOL) );
Bind(port);
@@ -117,8 +123,10 @@ void IvyWatcher::start(const char *domainlist) AddMember( addr.c_str() );
SendTo( hello, len, port, addr.c_str() );
}
+ running = true;
}
void IvyWatcher::stop()
{
Close();
+ running = false;
}
|