Home > Back-end >  Why can't create a socket, use SOCK_RAW, but can use SOCK_STREAM?
Why can't create a socket, use SOCK_RAW, but can use SOCK_STREAM?

Time:09-16

Why can't create a socket, use SOCK_RAW, but can use SOCK_STREAM?

CodePudding user response:

SOCK_STREAM is based on the TCP, guaranteed (i.e., to guarantee correct delivery of data to each other) connection-oriented SOCKET, used for data transfer,
SOCK_DGRAM is based on UDP, insecurity of message-oriented socket, more used to broadcast message on the Internet,
Original SOCK_RAW socket, the need to specify the IP datagram or agreement,
  • Related