Théophile Bastian
94f42d08c0
Clean up dramatically the codebase by assuming the server has only a single connection at any time.
21 lines
498 B
C++
21 lines
498 B
C++
#pragma once
|
|
|
|
#include <unordered_map>
|
|
#include <memory>
|
|
|
|
#include "UdpVpn.hpp"
|
|
|
|
class UdpVpnServer: public UdpVpn {
|
|
public:
|
|
UdpVpnServer(in_port_t port);
|
|
UdpVpnServer(const struct in6_addr& bind_addr6, in_port_t port);
|
|
protected:
|
|
virtual void acquire_peer(
|
|
TunnelledPacket& packet,
|
|
const sockaddr_in6& peer_ext_addr);
|
|
|
|
void bind(const struct in6_addr& bind_addr6, in_port_t port);
|
|
|
|
struct sockaddr_in6 _bind_addr;
|
|
};
|