Module

Erl.Kernel.Udp

#Options

type Options :: Row Type -> Row Typetype Options r = CommonOptions (add_membership :: Maybe (Tuple2 IpAddress IpAddress), broadcast :: Maybe Boolean, drop_membership :: Maybe (Tuple2 IpAddress IpAddress), multicast_if :: Maybe IpAddress, multicast_loop :: Maybe Boolean, multicast_ttl :: Maybe NonNegInt, read_packets :: Maybe NonNegInt | r)

#OpenOptions

type OpenOptions :: Row Typetype OpenOptions = Options (bind_to_device :: Maybe Binary, family :: Maybe AddressFamily, fd :: Maybe NonNegInt, ifaddr :: Maybe SocketAddress, ip :: Maybe SocketAddress, netns :: Maybe FileName, port :: Maybe Port)

#openPassive

#send

send :: forall socketMessageBehaviour. UdpSocket socketMessageBehaviour -> HostAddress -> Port -> IOData -> Effect (Either SendError Unit)

#recv

recv :: forall socketMessageBehaviour. UdpSocket socketMessageBehaviour -> Timeout -> Effect (Either ReceiveError UdpRecvData)

#close

close :: forall socketMessageBehaviour. UdpSocket socketMessageBehaviour -> Effect Unit

#port

port :: forall socketMessageBehaviour. UdpSocket socketMessageBehaviour -> Effect (Maybe Port)

#setopts

setopts :: forall options socketMessageBehaviour. Union (ForcedOptions ()) options (ForcedOptions options) => Nub (ForcedOptions options) (ForcedOptions options) => ConvertOptionsWithDefaults OptionToMaybe (Record (Options ())) (Record (ForcedOptions options)) (Record (ForcedOptions (Options ()))) => OptionsValid socketMessageBehaviour options => UdpSocket socketMessageBehaviour -> Record options -> Effect (Either PosixError Unit)

Modules