39 this->log = va_arg(* params, Logger);
40 port = va_arg(* params,
int);
50 if (-1 == (this->handle = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP))) {
52 "error opening socket: %s - service terminated",
58 setsockopt(this->handle, SOL_SOCKET, SO_REUSEADDR, &reUse,
sizeof(reUse));
69 if (STDERR_FILENO < this->handle) {
70 shutdown(this->handle, SHUT_RDWR);
static int socketCtor(void *_this, va_list *params)
void loggerLog(void *, logger_level, const char *const,...)
CREATE_CLASS(Sock, NULL, IFACE(Class))
INIT_IFACE(Class, socketCtor, socketDtor, NULL)
static void socketDtor(void *_this)