OpenJPH
Open-source implementation of JPEG2000 Part-15
|
A small wrapper for socket that only abstract Winsock2. More...
#include <ojph_sockets.h>
Public Member Functions | |
socket () | |
default constructor | |
socket (const ojph_socket &s) | |
a copy constructor | |
void | close () |
Abstracts socket closing function. | |
bool | set_blocking_mode (bool block) |
Sets the blocking mode. | |
ojph_socket | intern () |
provides access to the internal socket handle | |
Private Attributes | |
ojph_socket | s |
int for Linux/MacOS and SOCKET for Windows | |
A small wrapper for socket that only abstract Winsock2.
This is a small wrapper that only abstracts the difference between Windows and Linux/MacOS socket implementations. It does not not do much other than define a local member variable of type int for Linux/OS and type SOCKET for Windows, which is unsigned int/int64.
Definition at line 88 of file ojph_sockets.h.
|
inline |
default constructor
Definition at line 93 of file ojph_sockets.h.
References OJPH_INVALID_SOCKET, and s.
ojph::net::socket::socket | ( | const ojph_socket & | s | ) |
void ojph::net::socket::close | ( | ) |
Abstracts socket closing function.
Definition at line 63 of file ojph_sockets.cpp.
References close(), OJPH_INVALID_SOCKET, and s.
|
inline |
provides access to the internal socket handle
Definition at line 118 of file ojph_sockets.h.
References s.
Referenced by main().
bool ojph::net::socket::set_blocking_mode | ( | bool | block | ) |
Sets the blocking mode.
block | sets to true to operate in blocking mode |
Definition at line 78 of file ojph_sockets.cpp.
References s.
Referenced by main().
|
private |
int for Linux/MacOS and SOCKET for Windows
Definition at line 121 of file ojph_sockets.h.
Referenced by close(), intern(), set_blocking_mode(), socket(), and socket().