Data transmission over TCP

Data transmission over TCP In the first article we discussed how the TCP connection initiation and termination is performed and how we can see this in Wireshark. In this article, we will discuss the actual TCP data transmission procedure. TCP analysis articles TCP connection establishment and termination Data transmission over TCP The happy scenario TCP is using the cumulative acknowledgement approach, in which the TCP receiver is normally sending an ACK that represents the amount of contiguous data it got. The procedure of TCP transmission is as follows At the connection start, each side of the connection picks some random number called initial sequence number ISN. This number represents the number of the first byte this side will send to the other side. To make analysis easier, Wireshark will show this field starting from 0 but you can get the actual sequence number from the raw sequence number field on the Wireshark expert view. For each byte sent, the transmitting sid

Basic TCP analysis with Wireshark - Part 1

Basic TCP analysis with Wireshark TCP is a reliable connection-based protocol that is used by many of the application layer protocols we use every day. HTTP, HTTPS, and FTP are only a few examples from the list. This is the first article in a series that illustrates the basics of the TCP protocol and its analysis using Wireshark. Basic knowledge of how to use Wireshark is needed. TCP analysis articles TCP connection establishment and termination Data transmission over TCP What is TCP There are many transport layer protocols, from which TCP and UDP are the most popular. TCP is an acronym for T ransmission C ontrol P rotocol and it has the following characteristics Connection based: In TCP, a connection is established between the two communicating hosts and the state of this connection is maintained on the two hosts. Usually, the two hosts are named client and server and the client is the host who initiates the connection to the server. Reliable: TCP is a reliable protocol.

C++ enums

C++ enums C++ enum is a user-defined type that allows us to give textual names for integer values. Using enums you can increase code readability and reduce the probability of faults due to usage of hardcoded values. I will talk here about C++ different enumerations types and usages. Note that at least C++ 11 is required. In C++, there are two types of enums Scoped enums Unscoped enums Unscoped enums - called also plain enums - are very similar to the C language enums. We will start with them illustrating their C like usage, then introduce the new features added to them on C++. Unscoped enums You can use enums in C++ the same way as in C. The following code creates an enum that represents the traffic sign colors // Creating an enum for the traffic sign light colors enum trafficSignColors { red , yellow, green , }; Enumerators have an integer type that can at least hold it's enumerators' greatest value. By default the first enumerator will have the value