Unix ___domain socket: Difference between revisions

Content deleted Content added
m Moved link to first occurrence of the term
Socket instantiation: Better differentiation of TCP and UDP and changed sentences to singular
Line 104:
 
The <code>type</code> parameter will probably be one of two common socket types: stream or datagram.<ref name="lpi-p1151"/> A third socket type is available for experimental design: raw.
# <code>SOCK_STREAM</code> will create a stream socket. StreamA socketsstream providesocket provides a reliable, bidirectional, and bidirectional[[connection-oriented communication]] channel between two processes. Data are carried using the [[Transmission Control Protocol]] (TCP).
# <code>SOCK_DGRAM</code> will create a datagram socket.{{efn|A datagram ''socket'' should not be confused with a [[datagram]] [[Network packet|packet]] used in the [[network layer]].<ref name="lpi-p1183">{{cite book
|title=The Linux Programming Interface
Line 112:
|year=2010
|isbn=978-1-59327-220-3
|page=1183}}</ref>}} A Datagram socketssocket dodoes not guarantee reliability, butand is [[Connectionless communication|connectionless]]. As a result, the transmission is faster. Data are carried using the [[User Datagram Protocol]] (UDP).
# <code>SOCK_RAW</code> will create an [[Internet Protocol]] (IP) [[datagram]] socket. A Raw socketssocket skipskips the TCP/UDP [[transport layer]] and sendsends the packets directly to the [[network layer]].<ref name="lpi-p1184">{{cite book
|title=The Linux Programming Interface
|last=Kerrisk