The Windows Sockets Lame List

(or What's Weak This Week)

brought to you by the Windows Sockets Vendor Community
(compiled by Keith Moore)

  1. Calling connect() on a non-blocking socket, getting WSAEWOULDBLOCK, then immediately calling recv() and expecting WSAEWOULDBLOCK before the connection has been established.

  2. Calling select() with three empty FD_SETs and a valid TIMEOUT structure as a sleezy delay function.
    Inexcusably lame.

  3. Polling with connect() on a non-blocking socket to determine when the connection has been established.
    Dog lame.

  4. Assuming socket handles are always less than 16.
    Mired in a sweaty mass of lameness.

  5. Polling with select() and a zero timeout in Win16's non-preemptive environment.
    Nauseatingly lame.

  6. Calling WSAAsyncSelect() with a zero Event mask just to make the socket non-blocking.
    Lame. Lame. Lame. Lame. Lame.

  7. Telnet applications that neither enable OOBINLINE, nor read OOB data.
    Violently lame.

  8. Assuming 0 is an invalid socket handle value.
    Uncontrollably lame.

  9. Applications that don't properly shutdown when the user closes the main window while a blocking API is in progress.
    Totally lame.

  10. Out of band data.
    Intensely lame.

  11. Calling strlen() on a hostent structure's ip address, then truncating it to four bytes, thereby overwriting part of malloc()'s heap header.
    In all my years of observing lameness, I have seldom seen something this lame.

  12. Polling with recv(MSG_PEEK) to determine when a complete message has arrived.
    Thrashing in a sea of lameness.

  13. Martin Hall's hairline.
    Well, it's not that bad. Really. Certainly less lame than J. Allard's hairline.

  14. Bounding every set of operations with calls to WSAStartup() and WSACleanup().
    Pushing the lameness envelope.

  15. Ignoring API errors.
    Glaringly lame.

  16. Microsoft's Telnet and FTP clients.
    Indescribably lame.

  17. Installing an empty blocking hook that just returns FALSE.
    Floundering in an endless desert of lameness.

  18. Client applications that bind to a specific port.
    Suffocating in self lameness.

  19. Nagle challenged applications.
    Perilously teetering on the edge of a vast chasm of lameness.

  20. Assuming stream sockets maintain message frame boundaries.
    Mind bogglingly lame.

  21. 16-bit DLLs that call WSACleanup() from their WEP.
    Inconcievably lame.

  22. Single byte send()s and recv()s.
    Festering in a pool of lameness.

  23. select().
    Self abusively lame.

  24. Applications that call gethostbyname() before calling inet_addr().
    Words fail to express such all consuming lameness.

  25. Win32 applications that install blocking hooks.
    Grossly lame.

  26. Polling with ioctlsocket( FIONREAD ) on a stream socket until a complete "message" arrives.
    Exceeds the bounds of earthly lameness.

  27. Punching inanimate objects.
    Painfully lame.