Socket: Difference between revisions

From Computer Science Wiki
(Created page with "<center> <blockquote style="padding: 5px; background-color: #FFF8DC; border: solid thin gray;"> File:Exclamation.png This is student work which has not yet been approve...")
 
No edit summary
Line 1: Line 1:
<center>
= Sockets =
<blockquote style="padding: 5px; background-color: #FFF8DC; border: solid thin gray;">
  [[File:Exclamation.png]] This is student work which has not yet been approved as correct by the instructor
</blockquote>
</center>


[[file:Studying.png|right|frame|Case study notes<ref>http://www.flaticon.com/</ref>]]
== Overview ==
Sockets are an endpoint for sending and receiving data across a computer network. They enable communication between different processes, either within the same machine or over different machines. Sockets are a key concept in network programming and are used extensively in internet communications.


== Introduction ==
== Types of Sockets ==
There are two main types of sockets:


Please write a clear, concise description of your topic here.You will likely reference your introduction from somewhere else. Please use the following syntax at the end of each of your ideas. '''IT IS CRITICAL YOU ATTRIBUTE''' others work. Your introduction should be factual. No more than 3 or 4 sentences, please. Because you are not an expert in your topic, I expect you to triangulate your information. LOTS OF LINK TO OTHER RESOURCES PLEASE! If you do not use a section, please delete it. Your finished page should only have information which explains your topic.  
=== Stream Sockets ===
* '''Protocol''': Typically use Transmission Control Protocol (TCP).
* '''Characteristics''':
** Connection-oriented.
** Data is read in a continuous stream.
* '''Use Case''': Ideal for scenarios where reliable communication is crucial, like file transfers or sending/receiving messages in chat applications.


<nowiki>
=== Datagram Sockets ===
<ref>the url I cited by material from</ref>
* '''Protocol''': Usually employ User Datagram Protocol (UDP).
</nowiki>
* '''Characteristics''':  
 
** Connectionless.
== How does it work or a deeper look ==
** Data is read in chunks (datagrams).
 
* '''Use Case''': Suited for applications where speed is more critical than reliability, such as online games or streaming services.
* If you are discussing a THING YOU CAN TOUCH, you must explain how it works, and the parts it is made of. Google around for an "exploded technical diagram" of your thing, [http://cdiok.com/wp-content/uploads/2012/01/MRI-Technology.jpg maybe like this example of an MRI]  It is likely you will reference outside links. Please attribute your work.
* If you are discussing a PROCESS OR ABSTRACT CONCEPT (like [[fuzzy logic]]) you must deeply explain how it works.
 
== Examples ==
 
Please include some example of how your concept is actually used. Your example must include WHERE it is used, and WHAT IS BENEFIT of it being used.
 
== Pictures, diagrams ==
 
Pictures and diagrams go a LONG way to helping someone understand a topic. Especially if your topic is a little abstract or complex. Using a picture or diagram is a two part process:
 
# [https://www.mediawiki.org/wiki/Help:Managing_files upload a file]
# [https://www.mediawiki.org/wiki/Help:Images use the file on a wiki page]
 
== External links ==
 
* It would be helpful
* to include many links
* to other internet resources
* to help fellow students
* Please make sure the content is good
* and don't link to a google search results, please
 
== References ==
 
<references />
 
[[Category:2019 case study]]
[[Category:Student created article]]

Revision as of 23:58, 22 January 2024

Sockets[edit]

Overview[edit]

Sockets are an endpoint for sending and receiving data across a computer network. They enable communication between different processes, either within the same machine or over different machines. Sockets are a key concept in network programming and are used extensively in internet communications.

Types of Sockets[edit]

There are two main types of sockets:

Stream Sockets[edit]

  • Protocol: Typically use Transmission Control Protocol (TCP).
  • Characteristics:
    • Connection-oriented.
    • Data is read in a continuous stream.
  • Use Case: Ideal for scenarios where reliable communication is crucial, like file transfers or sending/receiving messages in chat applications.

Datagram Sockets[edit]

  • Protocol: Usually employ User Datagram Protocol (UDP).
  • Characteristics:
    • Connectionless.
    • Data is read in chunks (datagrams).
  • Use Case: Suited for applications where speed is more critical than reliability, such as online games or streaming services.