Which socket is used with a protocol that directly uses the services of IP.
Raw socket is used with a protocol that directly uses the services of IP.
Raw sockets are used to generate/receive packets of a type that the kernel doesn't explicitly support. An easy example that you're probably familiar with is PING. Ping works by sending out an ICMP (internet control message protocol - another IP protocol distinct from TCP or UDP) echo packet.
A raw socket is a type of socket that allows access to the underlying transport provider. This topic focuses only on raw sockets and the IPv4 and IPv6 protocols. ... The Windows Sockets 2 provider for TCP/IP included on Windows supports this SOCK_RAW socket type.
A network socket is one endpoint in a communication flow between two programs running over a network. Sockets are created and used with a set of programming requests or "function calls" sometimes called the sockets application programming interface (API).
Java provides three different types of sockets. Java provides three different types of sockets. Connection-oriented (TCP) sockets are implemented with the Socket class. Connectionless (UDP) sockets use the Datagramsocket class.