Sockets: Difference between revisions

From COMP15212 Wiki
gravatar Yuron [userbureaucratinterface-adminsysopPHRhYmxlIGNsYXNzPSJ0d3BvcHVwIj48dHI+PHRkIGNsYXNzPSJ0d3BvcHVwLWVudHJ5dGl0bGUiPkdyb3Vwczo8L3RkPjx0ZD51c2VyPGJyIC8+YnVyZWF1Y3JhdDxiciAvPmludGVyZmFjZS1hZG1pbjxiciAvPnN5c29wPGJyIC8+PC90ZD48L3RyPjwvdGFibGU+] (talk | contribs)
m (1 revision imported)
gravatar W81054ch [userbureaucratinterface-adminsysopPHRhYmxlIGNsYXNzPSJ0d3BvcHVwIj48dHI+PHRkIGNsYXNzPSJ0d3BvcHVwLWVudHJ5dGl0bGUiPkdyb3Vwczo8L3RkPjx0ZD51c2VyPGJyIC8+YnVyZWF1Y3JhdDxiciAvPmludGVyZmFjZS1hZG1pbjxiciAvPnN5c29wPGJyIC8+PC90ZD48L3RyPjwvdGFibGU+] (talk | contribs)
m (1 revision imported)
 
(One intermediate revision by one other user not shown)
Line 2: Line 2:
-->{{Path|IPC|7}}<!--
-->{{Path|IPC|7}}<!--
-->{{#invoke:Dependencies|add|Interprocess Communication,3}}
-->{{#invoke:Dependencies|add|Interprocess Communication,3}}
Sockets (in the software context) are another facilitator of serial [[Interprocess_Communication|interprocess communication]].  They may be compared to
Sockets (in the software context) are another facilitator of serial [[Interprocess_Communication|interprocess communication]].  They may be compared to the endpoints of [[pipes]] but are rather more sophisticated/abstracted.  For example, a form of socket may be used for communication across a network, providing <em>interprocess communication</em> between processes on remote computers.  They are probably most commonly associated with [https://en.wikipedia.org/wiki/Network_socket network communications] and [https://en.wikipedia.org/wiki/Transmission_Control_Protocol TCP].
the endpoints of [[pipes]] but are rather more sophisticated/abstracted.  For example, a form of socket may be used for communication across a network, providing <em>interprocess communication</em> between processes on remote computers.  They are probably most commonly associated with [https://en.wikipedia.org/wiki/Network_socket network communications] and [https://en.wikipedia.org/wiki/Transmission_Control_Protocol TCP].


A socket is a specific <em>endpoint</em> of a communications and will be
A socket is a specific <em>endpoint</em> of a communications and will be identified by a [https://en.wikipedia.org/wiki/Handle_%28computing%29 handle] in the appropriate process.
identified by a [https://en.wikipedia.org/wiki/Handle_%28computing%29 handle] in the appropriate process.


In the [https://en.wikipedia.org/wiki/Unix Unix] family of operating systems, sockets can be used
In the [https://en.wikipedia.org/wiki/Unix Unix] family of operating systems, sockets can be used connect [[Streams|streams]] or (more structured) [https://en.wikipedia.org/wiki/Datagram datagrams] <em>internally</em> rather than to another computer via an external network.
connect [[Streams|streams]] or (more structured)
[https://en.wikipedia.org/wiki/Datagram datagrams] <em>internally</em>
rather than to another computer via an external network.
----
----
 
{{BookChapter|3.8.1|146-149}}
{{PageGraph}}
{{PageGraph}}
{{Category|IO}}
{{Category|IO}}
{{Category|User}}
{{Category|User}}

Latest revision as of 10:03, 5 August 2019

On path: IPC 1: Processes • 2: Interprocess Communication • 3: Shared Memory • 4: Files • 5: Unix Signals • 6: Pipes • 7: Sockets • 8: Synchronisation • 9: Synchronisation Barrier • 10: Atomicity • 11: Mutual exclusion • 12: Signal and Wait
Depends on Interprocess Communication

Sockets (in the software context) are another facilitator of serial interprocess communication. They may be compared to the endpoints of pipes but are rather more sophisticated/abstracted. For example, a form of socket may be used for communication across a network, providing interprocess communication between processes on remote computers. They are probably most commonly associated with network communications and TCP.

A socket is a specific endpoint of a communications and will be identified by a handle in the appropriate process.

In the Unix family of operating systems, sockets can be used connect streams or (more structured) datagrams internally rather than to another computer via an external network.


Also refer to: Operating System Concepts, 10th Edition: Chapter 3.8.1, pages 146-149


Articles on IO
Cacheability • Device Drivers • Direct Memory Access (DMA) • IO • Interprocess Communication • Interrupt Controller • Interrupt Service Routines (ISRs) • Interrupts • Libraries • Peripheral devices • Pipes • Queues • Queues Extra • Resources • Shell • Sockets • Spooling and Buffering • Starvation • Streams • System Calls • Thrashing • Timers • Using Peripherals • Virtualisation • Write Buffer
Articles on User
"Everything is a File" • Application Binary Interface (ABI) • Arrays • Boot • Buffer Overflow • Containers • Daemons • Disk Partition • Dynamic Memory Allocation • Emulator traps • Environment Variables • Errors • Exceptions • File Attributes • File Locking • File Permissions • Introduction to Operating Systems • Journalling File System • Links • Locks • Man(ual pages in Unix) • Memory Mapped Files • Monitoring • Network File System (NFS) • PATH • Pipes • Pointers • Relocatable Code • Reset • SETUID • Shell • Sockets • Spooling and Buffering • Streams • Structures • Superuser • System Calls • Unix Signals • User • Using Peripherals