|
| Holumbus.Network.Core | | Portability | portable | | Stability | experimental | | Maintainer | Stefan Schmidt (stefanschmidt@web.de) |
|
|
|
|
|
| Description |
Version : 0.1
The Server-Module for the Holumbus framework.
It contains the lowlevel functions, like the socket handling (opening,
reading, writing, ...).
|
|
| Synopsis |
|
|
|
|
| Socket-Descriptor
|
|
|
| All data, that is needed to address a socket.
Contains the hostname and the portNumber.
| | Constructors | | Instances | |
|
|
| Server-Operations
|
|
|
| :: ServerDispatcher | dispatcher function
| | -> PortNumber | start port number
| | -> PortNumber | end port number
| | -> IO (Maybe (ThreadId, HostName, PortNumber)) | | | Creates a new (unix-)socket and starts the listener in its own thread.
You'll get the threadId of the listener Thread, so you can kill it.
It is also possible to give a range of PortNumbers on which the socket
will be opened. The first portnumber available will be taken.
|
|
|
| Client-Operations
|
|
|
| Send the query to a server and merge the result with the global result.
|
|
|
|
|
|
|
|
| Handle-Operations
|
|
|
| Puts a bytestring to a handle. But to make the reading easier, we write
the length of the data as a message-header to the handle, too.
|
|
|
| Reads data from a stream. We define, that the first line of the message
is the message header which tells us how much bytes we have to read.
|
|
|
| Constructors | | Instances | |
|
|
| Produced by Haddock version 2.6.1 |