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);
}
Example #2
0
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);
}
Example #3
0
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);
}
Example #4
0
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
}
Example #5
0
void EM::Acceptor::Start (const char *host, int port)
{
	Signature = evma_create_tcp_server (host, port);
	Eventables.insert( make_pair (Signature, this));
}