[GHC] #8529: Sequent reading from socket/connection on Windows fails

#8529: Sequent reading from socket/connection on Windows fails -------------------------------------+------------------------------------- Reporter: Heimdell | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: | Version: 7.4.2 libraries/haskell2010 | Operating System: Windows Keywords: sockets, windows, | Type of failure: Incorrect result read failure | at runtime Architecture: Unknown/Multiple | Test Case: Difficulty: Unknown | Blocking: Blocked By: | Related Tickets: | -------------------------------------+------------------------------------- I wrote a simple TCP-client, which consumes and produces 8-byte packets. When I run it on linux, it works perfectly, being part of the loop (write- read-write-read-...). On windows it receives only first msg from the other side (write-read- write-write-...). The packets are still going, although. Before that, I used the sockets directly; changing to HandleStream didn't help. The code is: {{{ transmit :: Int -> HandleStream ByteString -> ByteString -> IO [Bytestring] transmit delay sock packet = do let input = timeout delay $ sock `readBlock` 8 <* putStrLn "\nData was read!" sock `writeBlock` pack strings <- whileJust input return [str | Right str <- strings] whileJust action = do result <- action case result of Just a -> (:) <$> return a <*> whileJust action Nothing -> return [] }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8529 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8529: Sequent reading from socket/connection on Windows fails -------------------------------------+------------------------------------- Reporter: Heimdell | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: None | Version: 7.4.2 Resolution: invalid | Keywords: sockets, windows, Operating System: Windows | read failure Type of failure: Incorrect | Architecture: Unknown/Multiple result at runtime | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | -------------------------------------+------------------------------------- Changes (by thomie): * status: new => closed * resolution: => invalid * component: libraries/haskell2010 => None Comment: Thank you for the report. This is however not a bug in GHC or one of the [https://www.haskell.org/ghc/docs/latest/html/libraries/index.html libraries] supplied with GHC. It is rather a problem in your code or in in one of the network libraries you are using. Please try asking on stackoverflow first, attaching you full program. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8529#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC