|
EasySockets v2.0.0
A simple, cross platform socket library for C++.
|
An object which is required to exist for es::Sockets to be used. More...
#include <PosixContext.hpp>
Public Member Functions | |
| PosixContext ()=default | |
| PosixContext (const PosixContext &)=delete | |
| PosixContext & | operator= (const PosixContext &)=delete |
| PosixContext (PosixContext &&other) noexcept=default | |
| PosixContext & | operator= (PosixContext &&other) noexcept |
| ~PosixContext ()=default | |
| void | shutdown () |
| Terminates the context. | |
An object which is required to exist for es::Sockets to be used.
This ensures that any underlying setup and cleanup code is called.
For example:
es::Context context{}; // must be created before any sockets are created
es::Socket socket{es::IpVersion::ipv4, es::Protocol::tcp};
socket.bind({"0.0.0.0", 8080});
Can be moved from but not copied. Members are the same across all implementations.
|
default |
|
delete |
|
defaultnoexcept |
|
default |
|
delete |
|
noexcept |
|
inline |
Terminates the context.
Will be called when destructor is called.