Content deleted Content added
Added sourced material; removed unsourced material. |
m →Socket instantiation: Data is plural |
||
Line 96:
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. Stream sockets provide a reliable and bidirectional communication channel between two processes. Data
# <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 104:
|year=2010
|isbn=978-1-59327-220-3
|page=1183}}</ref>}} Datagram sockets do not guarantee reliability, but the transmission is faster. Data
# <code>SOCK_RAW</code> will create an [[Internet Protocol]] (IP) [[datagram]] socket. Raw sockets skip the TCP/UDP [[transport layer]] and send the packets directly to the [[network layer]].<ref name="lpi-p1184">{{cite book
|title=The Linux Programming Interface
|