startServer :: Maybe FilePath -> N.Socket -> IO ()
startServer cabal sock = do
  (inp,outp,rawi) <- setupCommandLoop cabal []
  void $ iterateWhile id $ acceptOne sock $ \clientHandle -> ignoreEPipe True $ do
    void $ atomically $ send rawi $ ClientLog "startServer" "New client connection"
    a <- async $ runProxy $ recvS outp >-> takeWhileInclusiveD (not . isClientExit) >-> mapD show >-> hPutStrLnD clientHandle
    r <- runProxy $ runMaybeK $ hGetLineS clientHandle >-> processRequest >-> leftD (sendD rawi) >-> rightD (sendD inp)
    do
      void $ atomically $ send rawi $ ClientLog "startServer" "Waiting for end of send process"
      wait a
    return (isJust r)
startServer :: Maybe FilePath -> N.Socket -> IO ()
startServer cabal sock = do
  (inp,outp,rawi) <- setupCommandLoop cabal []
  void $ iterateWhile id $ acceptOne sock $ \clientHandle -> ignoreEPipe True $ do
    void $ atomically $ send rawi $ ClientLog "startServer" "New client connection"
    a <- async $ runProxy $ recvS outp >-> takeWhileInclusiveD (not . isClientExit) >-> mapD show >-> hPutStrLnD clientHandle
    r <- runProxy $ runMaybeK $ hGetLineS clientHandle >-> processRequest >-> leftD (sendD rawi) >-> rightD (sendD inp)
    do
      void $ atomically $ send rawi $ ClientLog "startServer" "Waiting for end of send process"
      wait a
    return (isJust r)
startServer cabal sock = do
  (inp,outp,rawi) <- setupCommandLoop cabal []
  void $ iterateWhile id $ acceptOne sock $ \clientHandle -> ignoreEPipe True $ do
    void $ atomically $ send rawi $ ClientLog "startServer" "New client connection"
    a <- async $ runProxy $ recvS outp >-> takeWhileInclusiveD (not . isClientExit) >-> mapD show >-> hPutStrLnD clientHandle
    r <- runProxy $ runMaybeK $ hGetLineS clientHandle >-> processRequest >-> leftD (sendD rawi) >-> rightD (sendD inp)
    do
      void $ atomically $ send rawi $ ClientLog "startServer" "Waiting for end of send process"
      wait a
    return (isJust r)