Skip to main content

Home/ Haskell/ Group items tagged imported

Rss Feed Group items tagged

Javier Neira

Fatvat: Web Sockets and Haskell - 0 views

  •  
    import Network import System.IO import Control.Concurrent import Char serverHandshake = "HTTP/1.1 101 Web Socket Protocol Handshake\r\n\ \Upgrade: WebSocket\r\n\ \Connection: Upgrade\r\n\ \WebSocket-Origin: http://localhost\r\n\ \WebSocket-Location: ws://localhost:9876/\r\n\ \WebSocket-Protocol: sample\r\n\r\n\0" acceptLoop socket = forever $ do (h,_,_) IO () listenLoop h = do sendFrame h "hello from haskell" threadDelay (3 * 1000000) sendFrame h "it works!" return () sendFrame :: Handle -> String -> IO () sendFrame h s = do hPutChar h (chr 0) hPutStr h s hPutChar h (chr 255)
mesbah095

Guest Post Online - 0 views

  •  
    Article Writing & Guestpost You Can Join this Site for Your Article & guest post, Just Easy way to join this site & total free Article site. This site article post to totally free Way. Guest Post & Article Post live to Life time only for Current & this time new User. http://guestpostonline.com
1 - 20 of 42 Next › Last »
Showing 20 items per page