static VALUE t_start_server (VALUE self, VALUE server, VALUE port) { const unsigned long f = evma_create_tcp_server (StringValuePtr(server), FIX2INT(port)); if (!f) rb_raise (rb_eRuntimeError, "%s", "no acceptor (port is in use or requires root privileges)"); return ULONG2NUM (f); }
static VALUE t_start_server (VALUE self, VALUE server, VALUE port) { const unsigned long f = evma_create_tcp_server (StringValuePtr(server), FIX2INT(port)); if (!f) rb_raise (rb_eRuntimeError, "no acceptor"); return ULONG2NUM (f); }
static VALUE t_start_server (VALUE self UNUSED, VALUE server, VALUE port) { const uintptr_t f = evma_create_tcp_server (StringValueCStr(server), FIX2INT(port)); if (!f) rb_raise (rb_eRuntimeError, "%s", "no acceptor (port is in use or requires root privileges)"); return BSIG2NUM (f); }
void EM::Acceptor::Start (const char *host, int port) { Signature = evma_create_tcp_server (host, port); #ifdef OS_SOLARIS8 Eventables.insert( std::map<std::string,EM::Eventable*>::value_type (Signature, this)); #else Eventables.insert( make_pair (Signature, this)); #endif }
void EM::Acceptor::Start (const char *host, int port) { Signature = evma_create_tcp_server (host, port); Eventables.insert( make_pair (Signature, this)); }