Plan 9 from Bell Labs’s /usr/web/sources/contrib/fernan/nhc98/src/prelude/LowB/PrimOpenSocket.hs

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


module Prelude(cOpenSocket,primOpenSocket,SocketType) where

import IO hiding (IO(..))
import CString
import NHC.Internal (IO(..))
import DSocket

cOpenSocket primitive 3 :: PackedString -> Int -> SocketType -> (Either IOError Handle)

primOpenSocket :: String -> Int -> SocketType -> IO Handle
primOpenSocket host port stype = 
  IO ( \ world -> cOpenSocket (toCString host) port stype )

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.