Socket BSD API man pages

Socket BSD API man pages:

Sockets API:
  • socket: establish socket interface
  • gethostname: obtain hostname of system
  • gethostbyname: returns a structure of type hostent for the given host name
  • bind: bind a name to a socket
  • listen: listen for connections on a socket
  • accept: accept a connection on a socket
  • connect: initiate a connection on a socket
  • setsockopt: set a particular socket option for the specified socket.
  • close: close a file descriptor
  • shutdown: shut down part of a full-duplex connection

Interrogate a socket:
  • select: synchronous I/O multiplexing
  • FD_ZERO(), FD_CLR(), FD_SET(), FD_ISSET(): Set socket bit masks
  • poll: check on the state of a socket in a set of sockets. The set can be tested to see if any socket can be written to, read from or if an error occurred.
  • getsockopt: retrieve the current value of a particular socket option for the specified socket.

Read/Write:
  • recv/recvfrom/recvmsg: Read socket
  • send/sendto/sendmsg: Write socket

Convert:
  • ntohl/htonl, ntohs/htons: convert values between host and network byte order
  • inet_pton: Create a network address structure
  • inet_ntop: Parse network address structures

Other supporting system calls:
  • exit: Terminate process
  • perror: Output explanation of an error code
  • protocols: Network Protocols (see /etc/protocols)

Links:

  • Apache Portable Runtime (APR) - [documentation] - Portable socket wrapper functions.
  • SCTP - Stream Control Transmission Protocol
  • RPC - Remote Procedure Calls
  • IBM: Secure programming with the OpenSSL API

你可能感兴趣的:(socket,api,NetWork,documentation,protocols,Sockets)