network-can-0.1.0.0: CAN bus networking
Safe HaskellNone
LanguageHaskell2010

Network.SocketCAN.LowLevel

Synopsis

Documentation

socket :: IO Socket Source #

Create raw CAN socket

bind :: Socket -> SockAddrCAN -> IO () Source #

Bind CAN socket

close :: Socket -> IO () #

Close the socket. This function does not throw exceptions even if the underlying system call returns errors.

If multiple threads use the same socket and one uses unsafeFdSocket and the other use close, unexpected behavior may happen. For more information, please refer to the documentation of unsafeFdSocket.

data Family where #

Address families. The AF_xxxxx constants are widely used as synonyms for the corresponding PF_xxxxx protocol family values, to which they are numerically equal in mainstream socket API implementations.

Strictly correct usage would be to pass the PF_xxxxx constants as the first argument when creating a Socket, while the AF_xxxxx constants should be used as addrFamily values with getAddrInfo. For now only the AF_xxxxx constants are provided.

Some of the defined patterns may be unsupported on some systems: see isSupportedFamily.

Bundled Patterns

pattern AF_CAN :: Family

Controller Area Network

Instances

Instances details
Read Family 
Instance details

Defined in Network.Socket.Types

Show Family 
Instance details

Defined in Network.Socket.Types

Eq Family 
Instance details

Defined in Network.Socket.Types

Methods

(==) :: Family -> Family -> Bool #

(/=) :: Family -> Family -> Bool #

Ord Family 
Instance details

Defined in Network.Socket.Types

data Socket #

Basic type for a socket.

Instances

Instances details
Show Socket 
Instance details

Defined in Network.Socket.Types

Eq Socket 
Instance details

Defined in Network.Socket.Types

Methods

(==) :: Socket -> Socket -> Bool #

(/=) :: Socket -> Socket -> Bool #

Monad m => MonadReader Socket (SocketCANT m) Source # 
Instance details

Defined in Network.SocketCAN

Methods

ask :: SocketCANT m Socket #

local :: (Socket -> Socket) -> SocketCANT m a -> SocketCANT m a #

reader :: (Socket -> a) -> SocketCANT m a #