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

#include <tcpserverhandshakestrategy.h>

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

Public Member Functions

 TCPServerHandshakeStrategy ()=default
 Default constructor.
 
virtual ~TCPServerHandshakeStrategy ()=default
 Virtual destructor to ensure correct cleanup for derived classes.
 
void handle (Package package, Host *host) const override
 Handles the TCP 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.
 

Constructor & Destructor Documentation

◆ TCPServerHandshakeStrategy()

NetSim::TCPServerHandshakeStrategy::TCPServerHandshakeStrategy ( )
default

Default constructor.

Establishes a new instance of the TCPHandshakeStrategy.

◆ ~TCPServerHandshakeStrategy()

virtual NetSim::TCPServerHandshakeStrategy::~TCPServerHandshakeStrategy ( )
virtualdefault

Virtual destructor to ensure correct cleanup for derived classes.

Ensures that derived strategy objects related to TCP handshake are properly destroyed.

Member Function Documentation

◆ handle()

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

Handles the TCP handshake process.

Parameters
packageThe package containing handshake details.
hostThe context in which the strategy is invoked.

Based on the incoming package details, this method will generate the appropriate handshake packets (e.g., SYN, SYN-ACK) and route them through the network simulation.

Implements NetSim::IPackageStrategy.

Here is the call graph for this function:

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