NetSim 1.0.0
An educational network simulation software for students
Loading...
Searching...
No Matches
client.h
Go to the documentation of this file.
1#ifndef CLIENT_H
2#define CLIENT_H
3
4#include "host.h"
5
9
10namespace NetSim {
11
14
24class Client : public Host {
25public:
27 Client() = default;
28
35
41 void execDomainResolution(const QString &domain);
42
48 void execHandShake(const IPAddress &address);
49
56 void execHTTPRequest(const IPAddress &address, const QString &uri);
57
63 void execCloseConnection(const IPAddress &address);
64
73 void receivePackage(Package data) override;
74};
75} // namespace NetSim
76
77#endif // CLIENT_H
Represents a client in the network simulation.
Definition client.h:24
void execHTTPRequest(const IPAddress &address, const QString &uri)
Sends an HTTP request to the specified IP address and URI.
Definition client.cpp:86
Client()=default
Default constructor.
void execDomainResolution(const QString &domain)
Initiates a domain name resolution.
Definition client.cpp:14
void execCloseConnection(const IPAddress &address)
Closes the connection to the specified IP address.
Definition client.cpp:118
void execHandShake(const IPAddress &address)
Initiates a TCP handshake to the specified IP address.
Definition client.cpp:53
void receivePackage(Package data) override
Receives a package and processes based on its type.
Definition client.cpp:150
Represents a network host that can communicate through routers.
Definition host.h:32
NetworkCard networkCard() const
Retrieve the network card.
Definition host.cpp:15
Represents an IPv4 address.
Definition ipaddress.h:27
Represents a virtual network card with network and physical address capabilities.
Definition networkcard.h:27
Represents a network package.
Definition package.h:28
The Host class implements a host in the network.
Definition logger.h:12