UDP sockets UDP stands for User Datagram Protocol and is an alternative protocol to TCP the most common protocol used for data transfer over the internet. UDP is different from TCP in a number of ways. Most importantly UDP is a connectionless protocol. TCP vs UDP In the TCP protocol first a connection is established… Read More »
UDP sockets This article describes how to write a simple echo server and client using udp sockets in C on Linux/Unix platform. UDP sockets or Datagram sockets are different from the TCP sockets in a number of ways. The most important difference is that UDP sockets are not connection oriented. More technically speaking, a UDP… Read More »
Socket function – recv() If you are writing a socket program in python that communicates with some remote machine or server to receive data, then you shall be using the recv() function to receive data on a socket. The recv() can receive only a specified number of bytes into a string buffer. If the incoming… Read More »
In a previous example we learnt about the . In this example we shall build a basic ECHO client and server. The server/client shown here use TCP sockets or SOCK_STREAM. Tcp sockets are connection oriented, means that they have a concept of independent connection on a certain port which one application can use at a… Read More »
Socket programming in Java This is a quick guide/tutorial to learning socket programming in Java. The Socket class is documented at http://docs.oracle.com/javase/1.4.2/docs/api/java/net/Socket.html To summarise the basics, sockets are the fundamental “things” behind any kind of network communications done by your computer. For example when you type www.google.com in your web browser, it opens a socket… Read More »
Tutorial on how to code simple network servers and clients using low level Socket api in python.
Php and tcp/ip sockets This is a quick guide to learning socket programming in php. Socket programming php is very similar to C. Most functions are similar in names, parameters and output. However unlike C, socket programs written in php would run the same way on any os that has php installed. So the code… Read More »
This is a small script written in php that can fetch the whois information of an ip address from regional internet registries (RIR). Useful in finding information about ip address.
MAC Address The mac address (media access control address) or the hardware address or the ethernet address of an interface is a 48 bit number that looks like this : 00:1c:c0:f8:79:ee. Every machine connected to a network has a unique mac address that is used to deliver network packets to the correct machine. The mac… Read More »
On a Linux system, all network interfaces have a unique name that is shows up when you run the ifconfig command for example. The main network adapter often has the name eth0 or enp1s0 on linux systems. The ip address is configured using desktop gui tools, or through commands like ifconfig. If you are writing… Read More »