예제 #1
0
파일: ei_connect.c 프로젝트: 616050468/otp
int ei_reg_send_tmo(ei_cnode* ec, int fd, char *server_name,
		    char* buf, int len, unsigned ms)
{
    erlang_pid *self = ei_self(ec);
    self->num = fd;

    /* erl_errno and return code is set by ei_reg_send_encoded_tmo() */
    return ei_send_reg_encoded_tmo(fd, self, server_name, buf, len, ms);
}
예제 #2
0
파일: ic_tmo.c 프로젝트: 3112517927/otp
/* Client send message (Erlang distribution protocol) */
static int oe_send_tmo(CORBA_Environment *env, unsigned int ms)
{
    if (strlen(env->_regname) == 0) { 
	if (ei_send_encoded_tmo(env->_fd, env->_to_pid, env->_outbuf,
			    env->_iout, ms) < 0) { 
	    /* XXX Cannot send to peer? */
	    CORBA_exc_set(env, CORBA_SYSTEM_EXCEPTION, NO_RESPONSE, 
			  "Cannot connect to server"); 
	    return -1; 
	}
    } else {
	if (ei_send_reg_encoded_tmo(env->_fd, env->_from_pid, 
				env->_regname, env->_outbuf, 
				env->_iout, ms) < 0) {
	    /* XXX Cannot send to peer? */
	    CORBA_exc_set(env, CORBA_SYSTEM_EXCEPTION, NO_RESPONSE, 
			  "Cannot connect to server"); 
	    return -1; 
	}
    }
    return 0;
}
예제 #3
0
파일: send_reg.c 프로젝트: HansN/otp
int ei_send_reg_encoded(int fd, const erlang_pid *from, const char *to,
			char *msg, int msglen)
{
    return ei_send_reg_encoded_tmo(fd, from, to, msg, msglen, 0);
}