Socket Types Summary

The following table summarizes many of the attributes and features of supported socket types:

Socket Types

┌─────────────────────────────────────────────────────────────────────┐
│Socket Type #define in      Protocols     Connection   Primary Socket│
│            <SYS\SOCKET.H>                Oriented?    Calls         │
├─────────────────────────────────────────────────────────────────────┤
│Stream      SOCK_STREAM     TCP/IP, Local yes          send() or     │
│                            IPC                        recv()        │
├─────────────────────────────────────────────────────────────────────┤
│Sequenced   SOCK_SEQPACKET  NetBIOS       yes          send() or     │
│packet                                                 recv()        │
├─────────────────────────────────────────────────────────────────────┤
│Datagram    SOCK_DGRAM      TCP/IP, Local no*          sendto() or   │
│                            IPC, NetBIOS               recvfrom()*   │
├─────────────────────────────────────────────────────────────────────┤
│Raw         SOCK_RAW        TCP/IP        no*          sendto() or   │
│                                                       recvfrom()*   │
└─────────────────────────────────────────────────────────────────────┘

Table Note (*) Datagram sockets and raw sockets are connectionless, unless the application has called connect() for the socket. In this case, the socket is connected. Refer to Connection Modes for additional information.


[Back: Socket Types]
[Next: Guidelines for Using Socket Types]