コード例 #1
0
ファイル: conn.c プロジェクト: pwhelan/kannel
Connection *conn_open_tcp_with_port(Octstr *host, int port, int our_port,
		Octstr *our_host)
{
    int sockfd;

    sockfd = tcpip_connect_to_server_with_port(octstr_get_cstr(host), port,
					       our_port, our_host == NULL ?
					       NULL : octstr_get_cstr(our_host));
    if (sockfd < 0)
	return NULL;
    return conn_wrap_fd(sockfd, 0);
}
コード例 #2
0
int tcpip_connect_to_server(char *hostname, int port, const char *interface_name)
{

    return tcpip_connect_to_server_with_port(hostname, port, 0, interface_name);
}
コード例 #3
0
ファイル: socket.c プロジェクト: Jayriq/kannel-gateway
int tcpip_connect_to_server(char *hostname, int port, const char *source_addr)
{

    return tcpip_connect_to_server_with_port(hostname, port, 0, source_addr);
}