Commits

Anonymous committed 94de3a8

stopService updated

Comments (0)

Files changed (1)

Network/DNSSD/ServicesUtils.chs

 data RecordRef = RecordRef DNSServiceRef DNSRecordRef 
 
 
-stopService :: ServiceRef -> IO ()
-stopService (ServiceRef tid) = killThread tid
 
 marshalFlags  :: Flags -> CUInt
 marshalFlags = fromIntegral . marshal
 
 class CreateServiceRef t where
     createServiceRef :: ThreadId -> DNSServiceRef -> t
+    stopService :: t -> IO ()
 
 instance CreateServiceRef ServiceRef where
     createServiceRef tid _ = ServiceRef tid
+    stopService (ServiceRef tid) = killThread tid
 
 instance CreateServiceRef (RecServiceRefAdd) where
     createServiceRef = RecServiceRefAdd
+    stopService (RecServiceRefAdd tid _) = killThread tid
 
 instance CreateServiceRef (RecServiceRefRegister) where
     createServiceRef = RecServiceRefRegister
+    stopService (RecServiceRefRegister tid _) = killThread tid
 
 createService :: CreateServiceRef t => 
     Flags ->