ConcurrentUtils-0.4.1.0: Concurrent utilities

Safe HaskellNone
LanguageHaskell98

Control.CUtils.NetChan

Description

A channel module with transparent network communication.

Synopsis

Documentation

data NetSend t Source

Instances

data NetRecv t Source

Instances

newNetChan :: Binary t => IO (NetRecv t, NetSend t) Source

Creates a new channel, with receive and send ends.

newNetSend :: HostName -> IO (NetSend t) Source

Open a channel to another host

newNetRecv :: Binary t => IO (NetRecv t) Source

Creates a receive end of this host's channel. Type unsafe!

send :: Binary t => NetSend t -> t -> IO () Source

Sends something on a channel.

recv :: NetRecv a -> IO a Source

Receives something from a channel.

recvSend :: NetRecv (NetSend t) -> IO (NetSend t) Source

Receives the send end of a channel, on a channel.

sendRecv :: NetSend (NetRecv t) -> NetRecv t -> IO () Source

Sends the receive end of a channel, on a channel.

recvRecv :: Binary t => NetRecv (NetRecv t) -> IO (NetRecv t) Source

Receives the receive end of a channel, on a channel.

activateSend :: NetSend t -> IO (NetSend t) Source

get produces channel ends with some data missing. Use these to make them usable.