Monday, February 4, 2019

What is socket programming?


Socket programming is, first of all, a means of boosting ego among the geeks and nerds who know it.
There are two types of programmers, one who has done socket programming and one who has not.

You may learn socket through the discounted links below; I teach two courses about socket programming on Udemy.

https://www.udemy.com/tcpip-socket-programming-for-coders-using-csharp-net/?couponCode=HALF

https://www.udemy.com/course/udpsocketprogramming/?referralCode=9A39D0BAEBF79DBDE6A3


Aside from this difference, the term "socket" is referred to a software-level construct that can be used to access a computer network. The term "access" encompasses two things:

  1. A computer reading data from the network sent by another computer
  2. A computer writes data to the network to send it to another computer

It appears simple when we send a message over a computer network using an app like Whatsapp. But there's a lot of complexity going on underneath it. Even the programmers must be shielded from the radiation of things like the OSI model and BGP. That's where sockets come in. Let me give you the simple definition of a socket.

Socket: 
A socket is a variable you can create in a high-level programming level, such as C#, Java, or C++. Once you have the socket, you can send and receive data using the computer network.
A socket is like an abstraction. It hides a lot of complexity under it and lets the coders write code that results in transmitting their data through WiFi, Ethernet, or any other means.
Sockets are often exposed through various APIs.

A few examples of socket APIs are given below, along with their mother languages.

  1. Java - java.net.*
  2. C# - System.Net.*
  3. C++ - socket.h

Windows provides an implementation of sockets through WinSock2 API. This is, in turn, used by runtimes like JVM(Java Virtual Machine) and .Net CLR(Common Language Runtime).
You don't need to learn C to work on this course.



1 comment:

Feel free to talk back...