Networking example.
More...
#include <iostream>
#include <cstring>
#include <system_error>
#include <getopt.h>
#include <chrono>
#include <thread>
#include <net/net_if.h>
#include <net/inet.h>
#include <util/poller.h>
#include <util/event.h>
#include <util/iostream.h>
#include <util/logger.h>
Go to the source code of this file.
|
void | print_available_addrs () |
|
void | print_interfaces () |
|
string | resolve (const string &host, bool udp=false) |
|
void | test_tcp (const string &host, int port, unsigned scope, int timeout) |
|
void | listen_tcp (const string &host, int port, unsigned scope) |
|
void | connect_tcp (const string &host, int port, unsigned scope) |
|
void | listen_udp (const string &host, int port, unsigned scope) |
|
void | connect_udp (const string &host, int port, unsigned scope) |
|
void | test_connection (const string &host, int port, unsigned scope, int timeout) |
|
void | server (const string &host, int port, bool udp, unsigned scope) |
|
void | client (const string &host, int port, bool udp, unsigned scope) |
|
int | main (int argc, char **argv) |
|
Networking example.
Definition in file netmain.cc.