Main Page
Namespaces
Namespace List
Namespace Members
All
Functions
Typedefs
Classes
Class List
Class Hierarchy
Class Members
All
Functions
Files
File List
File Members
All
Functions
Variables
Macros
src
examples
examples/sockets.cpp
Go to the documentation of this file.
1
13
/*****************************************************************************
14
** Includes
15
*****************************************************************************/
16
17
#include <iostream>
18
#include "../../include/ecl/io/sockets.hpp"
19
20
/*****************************************************************************
21
** Main program
22
*****************************************************************************/
23
24
int
main
(
int
argc,
char
**argv) {
25
26
ecl::SocketError
error =
ecl::init_sockets
();
27
if
( error.
flag
() !=
ecl::NoError
) {
28
std::cout << error.
what
() << std::endl;
29
}
else
{
30
std::cout <<
"Socket subsystem started up sucessfully."
<< std::endl;
31
}
32
// ecl::sockets::socket_descriptor = socket(AF_INET, SOCK_STREAM, 0);
33
34
return
0;
35
}
main
int main(int argc, char **argv)
Definition:
examples/sockets.cpp:24
ecl::Error::what
virtual const char * what() const
ecl::SocketError
Extends the generic error handler with socket specific error strings.
Definition:
sockets.hpp:74
ecl::init_sockets
ecl_io_PUBLIC SocketError init_sockets()
Initialise the socket subsystem.
Definition:
lib/sockets.cpp:31
ecl::Error::flag
virtual ErrorFlag flag() const
ecl::NoError
NoError
ecl_io
Author(s): Daniel Stonier
autogenerated on Wed Mar 2 2022 00:13:55