tec::networking::ClientConnectionEvent

More...

#include <server.hpp>

Public Functions

Name
void RegisterLuaType(sol::state & )
void from_endpoint(const asio::ip::tcp::endpoint & endpoint)
load info from a TCP endpoint
void from_endpoint(const asio::ip::udp::endpoint & endpoint)
load info from a UDP endpoint

Public Attributes

Name
bool cancel
std::string reason
int port
std::string address
std::string family
std::string protocol

Detailed Description

struct tec::networking::ClientConnectionEvent;

this structure passed to lua functions: onClientConnected onClientDisconnected containing information about the event. for connect events: setting cancel to true will reject the connection, rejected connections will get the "reason" string sent to the client.

Public Functions Documentation

function RegisterLuaType

static void RegisterLuaType(
    sol::state & 
)

function from_endpoint

void from_endpoint(
    const asio::ip::tcp::endpoint & endpoint
)

load info from a TCP endpoint

function from_endpoint

void from_endpoint(
    const asio::ip::udp::endpoint & endpoint
)

load info from a UDP endpoint

Public Attributes Documentation

variable cancel

bool cancel;

variable reason

std::string reason;

variable port

int port;

variable address

std::string address;

variable family

std::string family;

variable protocol

std::string protocol;

Updated on 2022-07-24 at 19:27:35 +0000