36#ifndef _CHOMP_MULTIWORK_MWLOWLEV_H_
37#define _CHOMP_MULTIWORK_MWLOWLEV_H_
97int mwAccept (
int fd, std::string &computer,
int timeout = -1);
103int mwSelect (
const int *workers,
int nworkers,
int listensocket,
104 int *ioflags,
int timeout);
int mwSendBytes(int fd, const char *buf, int len)
Sends the given buffer to the given socket.
mwIOconstants
Input/output flags and error codes used for network communication, mainly for the 'select' function t...
@ mwTimeOut
A connection time out has occurred.
@ mwCanWrite
Writing possible.
@ mwCanRead
Reading possible.
@ mwNone
No flag selected.
@ mwLost
The network connection has been lost.
int mwListen(int port, int queuesize)
Begins listening at the given port.
int mwSelect(const int *workers, int nworkers, int listensocket, int *ioflags, int timeout)
Determines IOflags for each of the workers and additionally the listensocket (the last flag).
int mwAccept(int fd, std::string &computer, int timeout=-1)
Waits for and accepts a connection at the given socket.
void mwDisconnect(int fd)
Disconnects the given socket.
int mwRecvBytes(int fd, char *buf, int len)
Receives the given amount of data from the given socket.
int mwConnect(const char *name, int port)
Connects to the given computer at the given port.
This namespace contains the entire CHomP library interface.