send'event'connection :: Server -> IO (Maybe Client)
send'event'connection serv = do
 mv <- newEmptyMVar
 putMVar (_mv serv) $ Connection mv
 client <- takeMVar mv
 case client of
  Nothing -> return Nothing
  (Just client') -> do
   putStrLn $ "new connection: " ++ (show $ _id client')
   return client
send'event'connection :: Server -> IO (Maybe Client)
send'event'connection serv = do
 mv <- newEmptyMVar
 putMVar (_mv serv) $ Connection mv
 client <- takeMVar mv
 case client of
  Nothing -> return Nothing
  (Just client') -> do
   putStrLn $ "new connection: " ++ (show $ _id client')
   return client
send'event'connection serv = do
 mv <- newEmptyMVar
 putMVar (_mv serv) $ Connection mv
 client <- takeMVar mv
 case client of
  Nothing -> return Nothing
  (Just client') -> do
   putStrLn $ "new connection: " ++ (show $ _id client')
   return client