Advantech PCL-848A/B Especificaciones Pagina 43

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 56
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 42
University of Hertfordshire
36
SOCK_SEQPACKET: Only used in AF_NS protocol
SOCK_RDM: Not implemented
The third argument is the protocol number.
bind
#include<sys/types.h>
#include<sys/socket.h>
int bind(int socket, struct sockaddr *my_addr, int my_addr_length)
The bind function is used to associate a process with a socket. In this project, bind function is used
in server processes to set up a socket for incoming client connections. The first argument to bind is
the socket value returned from the function socket. The second argument is the address of a
sockaddr structure, including IP and port. The third argument is the length of sockadd structure.
listen
#include<sys/sockedt.h>
int listen(int socket, int input_queue_length);
In order to listen for incoming socket connection, listen function is used. The first argument to listen
is the value returned from socket function. The second argument sets the incoming queue function.
connect
#include<sys/types.h>
#include<sys/socket.h>
int connect(int socket, struct sockaddr *server_address, int server_address_length);
The connect function is used to connect a local socket to a remote service. The first argument to
connect is the socket value returned from the function socket. The second argument is the address of
a sockaddr structure, including IP and port. The third argument is the length of sockadd structure.
Vista de pagina 42
1 2 ... 38 39 40 41 42 43 44 45 46 47 48 ... 55 56

Comentarios a estos manuales

Sin comentarios