Winsock and Sockets - JesperPed91/PLCSS GitHub Wiki

Winsock is a file that makes is possible for Window programs to connect to the internet, it is short for ”Windows sockets”. In our code, the winsock is first added in “#include <WS2tcpip.h>” which is a header file that includes elements from the windows header file (Windows.h). It is an API (Application Programming Interface) that is used to make programs function with internet. The winsock is first called when writing:

WSADATA wsData;

WORD ver = MAKEWORD(2, 2);

A socket is an end point that is match up with a port and an IP address, it is basically just a number but in the windows world it is made a type.

The server waits and listens to the socket for a client to request for a connection. So, it is an endpoint for a two-way communication path.

References: (used 28. December 2017) Winsock: http://searchwindowsserver.techtarget.com/definition/Winsock Socket: https://docs.oracle.com/javase/tutorial/networking/sockets/definition.html Both: https://www.youtube.com/watch?v=WDn-htpBlnU

⚠️ **GitHub.com Fallback** ⚠️