PDA

View Full Version : UNIX Socket FAQ


  1. select() usage examples
  2. Ejemplos de uso de "select()"
  3. 2.1 - How to tell when a socket is closed on the other end?
  4. 2.2 - What's with the second parameter in bind()?
  5. 2.3 - How do I get the port number for a given service?
  6. 2.4 - If bind() fails, what should I do with the descriptor?
  7. 2.5 - How do I properly close a socket?
  8. 2.6 - When should I use shutdown()?
  9. 2.7 - Please explain the TIME_WAIT state
  10. 2.8 - Why does it take so long to detect that the peer died?
  11. 2.9 - Pros/cons of select(), non-blocking I/O and SIGIO
  12. 2.10 - Why do I get EPROTO from read()?
  13. 2.11 - How to force a socket to send the data in its buffer
  14. 2.12 - Where can I get a library for programming sockets?
  15. 2.13 - select() says there is data, but read returns 0?
  16. 2.14 - Whats the difference between select() and poll()?
  17. 2.15 - How do I send [this] over a socket?
  18. 2.16 - How do I use TCP_NODELAY?
  19. 2.17 - What exactly does the Nagle algorithm do?
  20. 2.18 - What is the difference between read() and recv()?
  21. 2.19 - handling SIGPIPE signal or EPIPE errno
  22. 2.20 - After the chroot(), calls to socket() are failing.
  23. 2.21 - Why do I keep getting EINTR from the socket calls?
  24. 2.22 - When will my application receive SIGPIPE?
  25. 2.23 - What are socket exceptions? What is out-of-band data?
  26. 2.24 - How can I find the full hostname (FQDN)?
  27. 2.25 - How do I monitor the activity of sockets?
  28. 1.3 - Who is this FAQ for?
  29. 1.4 - What are Sockets?
  30. 1.5 - How do Sockets Work?
  31. 1.6 - Where can I get source code for the book [title]?
  32. 1.7 - Where can I get more information?
  33. 1.8 - Where can I get the sample source code?
  34. 1.2 - About this FAQ
  35. 3.1 - How do I convert a string into an internet address?
  36. 3.2 - How can my client work through a firewall/proxy server
  37. 3.3 - Why does connect() succeed before server did an accept
  38. 3.4 - Why do I sometimes lose a server's address?
  39. 3.5 - How to set the timeout for the connect() system call
  40. 3.6 - bind() explicitly or let connect() do it?
  41. 3.7 - Why do I get "connection refused" ?
  42. 3.8 - What to do to recv' unknown data size
  43. 3.9 - How can I determine the local port number?
  44. 4.1 - How come I get "address already in use" from
  45. 4.2 - Why don't my sockets close?
  46. 4.3 - How can I make my server a daemon?
  47. 4.4 - How can I listen on more than one port at a time?
  48. 4.5 - What exactly does SO_REUSEADDR do?
  49. 4.6 - What exactly does SO_LINGER do?
  50. 4.7 - What exactly does SO_KEEPALIVE do?
  51. 4.8 How can I bind() to a port number < 1024?
  52. 4.9 - How to find out the client's address/hostname
  53. 4.10 - How should I choose a port number for my server?
  54. 4.11 - Difference between SO_REUSEADDR and SO_REUSEPORT
  55. 4.12 - How can I write a multi-homed server?
  56. 4.13 - How can I read only one character at a time?
  57. 4.14 - Attaching processes IO using sockets.
  58. 5.1 - When should I use UDP instead of TCP?
  59. 5.2 - Difference between "connected" and "unc
  60. 5.3 - How connect() affects the recv behaviour of the socket
  61. 5.4 - How to read ICMP errors from "connected" UDP
  62. 5.5 - How can I be sure that a UDP message is received?
  63. 5.6 - How to be sure that UDP messages are received in order
  64. 5.7 - How often should I re-transmit un-acknowleged messages
  65. 5.8 - Only the first part of my datagram is getting through
  66. 5.9 - The socket's buffer fill up sooner than expected
  67. 6.1 - How would I put my socket in non-blocking mode?
  68. 6.2 - How can I put a timeout on connect()?
  69. 6.3 - Complete read without select()
  70. 6.4 - How to use select routine
  71. 6.5 - RAW sockets
  72. 6.6 - Restricting a socket to a given interface
  73. 6.7 - Receiving all incoming traffic through a RAW-socket?
  74. 6.8 - Multicasting
  75. 6.9 - IP header of a UDP message
  76. 6.10 - To fork or not to fork?
  77. 7.1 - Looking for a good C++ socket library
  78. 7.2 - perl examples of source code
  79. 7.3 - Where is the source code from Richard Stevens' books?
  80. 8.1 - send() hangs up when sending to a turned off computer
  81. 8.2 - Error when using inetd
  82. 8 - Bugs and Strange Behaviour
  83. 7 - Sample Source Code
  84. 6 - Advanced Socket Programming
  85. 5 - Writing UDP/SOCK_DGRAM applications
  86. 4 - Writing Server Applications (TCP/SOCK_STREAM)
  87. 3 - Writing Client Applications (TCP/SOCK_STREAM)
  88. 2 - Questions regarding Clients & Servers (TCP/SOCK_STRE
  89. 1 - General Information and Concepts
  90. 6.11 Connect with timeout (or another use for select() )