Molybden API
Loading...
Searching...
No Matches
molybden::NetworkEvents Class Reference

A class that contains all network events. More...

#include <network_events.hpp>

Inheritance diagram for molybden::NetworkEvents:
molybden::Network

Public Attributes

Event< NetworkChangedonNetworkChanged
 Invoked when the current network connection has changed.
 
Event< PacScriptErrorReceivedonPacScriptErrorReceived
 Invoked when the PAC file processing has been failed.
 
Event< RedirectResponseCodeReceivedonRedirectResponseCodeReceived
 Invoked when a redirect response code (3xx) has been received for the URL request.
 
Event< RequestCompletedonRequestCompleted
 Invoked when the URL request has been completed.
 
Event< RequestDestroyedonRequestDestroyed
 Invoked when the URL request has been destroyed.
 
Event< ResponseBytesReceivedonResponseBytesReceived
 Invoked when a part of HTTP response body has been received over the network.
 
Event< ResponseStartedonResponseStarted
 Invoked when the first byte of the URL response body has been received.
 

Detailed Description

A class that contains all network events.

Member Data Documentation

◆ onNetworkChanged

Event<NetworkChanged> molybden::NetworkEvents::onNetworkChanged

Invoked when the current network connection has changed.

The method is invoked whenever a change affects the route network packets take to any network server.

For example, when:

  • A network connection becomes available or going away;
  • A VPN tunnel is established or taken down;
  • An active network connection's IP address changes.

Use the following approach to subscribe to receiving the event:

network->onNetworkChanged += [](const NetworkChanged& event) {};
The NetworkEvents::onNetworkChanged event arguments.
Definition network_events.hpp:22

◆ onPacScriptErrorReceived

Event<PacScriptErrorReceived> molybden::NetworkEvents::onPacScriptErrorReceived

Invoked when the PAC file processing has been failed.

Use the following approach to subscribe to receiving the event:

network->onPacScriptErrorReceived += [](const PacScriptErrorReceived& event) {};
The NetworkEvents::onPacScriptErrorReceived event arguments.
Definition network_events.hpp:37

◆ onRedirectResponseCodeReceived

Event<RedirectResponseCodeReceived> molybden::NetworkEvents::onRedirectResponseCodeReceived

Invoked when a redirect response code (3xx) has been received for the URL request.

Use the following approach to subscribe to receiving the event:

network->onRedirectResponseCodeReceived += [](const RedirectResponseCodeReceived& event) {};
The NetworkEvents::onRedirectResponseCodeReceived event arguments.
Definition network_events.hpp:57

◆ onRequestCompleted

Event<RequestCompleted> molybden::NetworkEvents::onRequestCompleted

Invoked when the URL request has been completed.

Use the following approach to subscribe to receiving the event:

network->onRequestCompleted += [](const RequestCompleted& event) {};
The NetworkEvents::onRequestCompleted event arguments.
Definition network_events.hpp:85

◆ onRequestDestroyed

Event<RequestDestroyed> molybden::NetworkEvents::onRequestDestroyed

Invoked when the URL request has been destroyed.

Use the following approach to subscribe to receiving the event:

network->onRequestDestroyed += [](const RequestDestroyed& event) {};
The NetworkEvents::onRequestDestroyed event arguments.
Definition network_events.hpp:122

◆ onResponseBytesReceived

Event<ResponseBytesReceived> molybden::NetworkEvents::onResponseBytesReceived

Invoked when a part of HTTP response body has been received over the network.

Use the following approach to subscribe to receiving the event:

network->onResponseBytesReceived += [](const ResponseBytesReceived& event) {};
The NetworkEvents::onResponseBytesReceived event arguments.
Definition network_events.hpp:137

◆ onResponseStarted

Event<ResponseStarted> molybden::NetworkEvents::onResponseStarted

Invoked when the first byte of the URL response body has been received.

For HTTP requests, this means that the status line and the response headers are available.

Use the following approach to subscribe to receiving the event:

network->onResponseStarted += [](const ResponseStarted& event) {};
The NetworkEvents::onResponseStarted event arguments.
Definition network_events.hpp:170

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