Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

socket_connect.c File Reference

#include <netinet/in.h>
#include <netdb.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>

Functions

int socket_connect (char *host, int port)
 Connect a TCP-stream to a server (Client side). More...


Function Documentation

int socket_connect char *    host,
int    port
 

Connect a TCP-stream to a server (Client side).

Creates a socket and connect it over a TCP-stream to the specified port on the specified server.

Parameters:
host  a string (char *) which specifies the name or the IP-address of the server.
port  an integer which specifies the port on the server.
Returns:
The File Descriptor (FD) which allows access to the TCP-stream-socket or -1 if the connection fails.


Generated on Thu Feb 17 10:17:23 2005 for FinalYearProject,A.Hofmeier:CommunicationLibrary by doxygen1.2.15