NetSim 1.0.0
An educational network simulation software for students
Loading...
Searching...
No Matches
Public Member Functions | List of all members
NetSim::TCPClientHandshakeStrategy Class Reference

Implements the client-side TCP handshake strategy. More...

#include <tcpclienthandshakestrategy.h>

Inheritance diagram for NetSim::TCPClientHandshakeStrategy:
Inheritance graph
[legend]
Collaboration diagram for NetSim::TCPClientHandshakeStrategy:
Collaboration graph
[legend]

Public Member Functions

 TCPClientHandshakeStrategy ()=default
 Default constructor.
 
virtual ~TCPClientHandshakeStrategy ()=default
 Default destructor.
 
void handle (Package package, Host *host) const override
 Handles the package during the handshake process.
 
- Public Member Functions inherited from NetSim::IPackageStrategy
 IPackageStrategy ()=default
 Default constructor.
 
virtual ~IPackageStrategy ()=default
 Virtual destructor to ensure correct cleanup for derived classes.
 
virtual void handle (Package package, Host *host) const =0
 Abstract method for handling packages.
 

Detailed Description

Implements the client-side TCP handshake strategy.

This strategy handles the client-side behavior during the initiation of a TCP connection. It defines how a package should be processed by a client when attempting to establish a connection to a server.

Constructor & Destructor Documentation

◆ TCPClientHandshakeStrategy()

NetSim::TCPClientHandshakeStrategy::TCPClientHandshakeStrategy ( )
default

Default constructor.

◆ ~TCPClientHandshakeStrategy()

virtual NetSim::TCPClientHandshakeStrategy::~TCPClientHandshakeStrategy ( )
virtualdefault

Default destructor.

Member Function Documentation

◆ handle()

void NetSim::TCPClientHandshakeStrategy::handle ( Package  package,
Host host 
) const
overridevirtual

Handles the package during the handshake process.

Parameters
packagePackage to be processed.
hostClient host.

This method is responsible for processing the package intended to initiate the handshake. It retrieves the MAC address of the router associated with the connection, fetches the HTTP process from the client's host, and then sends the handshake package to the router.

Implements NetSim::IPackageStrategy.

Here is the call graph for this function:

The documentation for this class was generated from the following files: