Content
    Functions

BSD Socket API

Socket Sequence Diagram

Functions

  • socket(): Create socket descriptor
  • bind(): Associate socket with a local IP address and port
  • listen(): Put connection-oriented socket in waiting mode
  • accept(): Wait for next connection from client
  • connect(): Connect from client to server
  • read(), recv(), recvfrom(), recvmsg(): Read requests
  • write(), send(), sendto(), sendmsg(): Write response
  • close(): Close network connection
  • shutdown(): Close (half-close) network connection
  • getsockopt(), setsockopt(): Get and change socket settings

Inspired by Stack Overflow



  • Category

  • Programming

  • Tags

  • Computer Science
    OS
    Linux

  • Created

  • 8. April 2022


  • Modified

  • 12. May 2025