当前位置: 首页 > 工具软件 > APIMAN > 使用案例 >

Socket BSD API man pages

慕容超
2023-12-01
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:

Convert:

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


Links:


 类似资料:

相关阅读

相关文章

相关问答