SEVER

Classes

Note, that server share its files with socket.

Types

Files

This class is ment to make network komunication easier. Just create an instance of this class, set it up (create some basic connections), set events handlers (you give the server some functions and it will call them, whenever something happens) and let it run. It can be used for server without forks/threads or for some clients as well. It provides timer as well, with resolution in seconds. Note that it does not support copying, it would throw an exception if you try. It contains a send queue for all sockets, so if you want to send more data than can be sent in one block, it will wait there and will be sent as soon as it is possible.

The address class is for giving address to a socket.

Interface of address

Interface of server

Functions

Error handling

The error handling is done trough vorlib::socket_e class (inherits from the vorlib::exception). As an add to the standart exception, it contains also handle variable, witch contains the socket identificator, if it makes sence. The error ids are here: You probably noticed, that some numbers are missing. It is because this exception class is used by sockets as well and this errors are just for the sockets. They makes no sence with the server.