NetSim 1.0.0
An educational network simulation software for students
|
Implements the client-side TCP connection close strategy. More...
#include <tcpclientconnectionclosestrategy.h>
Public Member Functions | |
TCPClientConnectionCloseStrategy ()=default | |
Default constructor. | |
virtual | ~TCPClientConnectionCloseStrategy ()=default |
Default destructor. | |
void | handle (Package package, Host *host) const override |
Handles the package to close the connection. | |
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. | |
Implements the client-side TCP connection close strategy.
This strategy handles the client-side behavior when attempting to close a TCP connection. It defines how a package should be processed by a client when closing a connection to the server.
|
default |
Default constructor.
|
virtualdefault |
Default destructor.
|
overridevirtual |
Handles the package to close the connection.
This method is responsible for processing the package intended to close the connection. It looks up the router associated with the connection, retrieves the HTTP process from the client's host, and forwards the closing handshake package to the router.
Implements NetSim::IPackageStrategy.