Namespaces | Enumerations | Functions

mwlowlev.h File Reference

This file contains the definition of some low-level functions for the TCP/IP streams communication and port operations. More...

#include <string>

Go to the source code of this file.

Namespaces

namespace  chomp
 

This namespace contains the entire CHomP library interface.


namespace  chomp::multiwork
 

This namespace contains an interface to the MultiWork module which allows one to easily distribute a computational task over multiple processes and run concurrent computations.


Enumerations

enum  chomp::multiwork::mwIOconstants {
  chomp::multiwork::mwNone = 0, chomp::multiwork::mwCanRead = 0x01, chomp::multiwork::mwCanWrite = 0x02, chomp::multiwork::mwTimeOut = -4,
  chomp::multiwork::mwLost = -5
}
 

Input/output flags and error codes used for network communication, mainly for the 'select' function to check which sockets are available for reading/writing.

More...

Functions

int chomp::multiwork::mwSendBytes (int fd, const char *buf, int len)
 Sends the given buffer to the given socket.
int chomp::multiwork::mwRecvBytes (int fd, char *buf, int len)
 Receives the given amount of data from the given socket.
int chomp::multiwork::mwConnect (const char *name, int port)
 Connects to the given computer at the given port.
int chomp::multiwork::mwListen (int port, int queuesize)
 Begins listening at the given port.
int chomp::multiwork::mwAccept (int fd, std::string &computer, int timeout=-1)
 Waits for and accepts a connection at the given socket.
int chomp::multiwork::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).
void chomp::multiwork::mwDisconnect (int fd)
 Disconnects the given socket.

Detailed Description

This file contains the definition of some low-level functions for the TCP/IP streams communication and port operations.

These functions are used internally by the worker and coordinator classes for the purpose of network communication.

Author:
Pawel Pilarczyk

Definition in file mwlowlev.h.