Creating a Socket
int socket(int family,int type,int proto);
family specifies the protocol family (PF_INET for TCP/IP).
type specifies the type of service (SOCK_STREAM, SOCK_DGRAM).
protocol specifies the specific protocol (usually 0 which means the default).