LeechCraft  0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
The network utilities

Common network-related classes and functions. More...

Classes

class  LC::Util::CustomCookieJar
 A customized cookie jar with additional features. More...
 
class  LC::Util::CustomNetworkReply
 A network reply with customizable content and reply headers. More...
 
class  LC::Util::NetworkDiskCache
 A thread-safe garbage-collected network disk cache. More...
 
class  LC::Util::NetworkDiskCacheGC
 Garbage collection for a set of network disk caches. More...
 

Functions

AddrList_t LC::Util::GetLocalAddresses (int port=0)
 Returns all local addresses. More...
 
QList< QHostAddress > LC::Util::GetAllAddresses ()
 Returns all addresses likely accessible "from the outside". More...
 
QString LC::Util::GetSocketErrorString (QAbstractSocket::SocketError error)
 Returns an error string for the given socket error. More...
 
QTreeWidgetItem * LC::Util::SslError2TreeItem (const QSslError &error)
 Builds a tree widget representation of the given SSL error. More...
 

Detailed Description

Common network-related classes and functions.

Function Documentation

◆ GetAllAddresses()

UTIL_NETWORK_API QList< QHostAddress > LC::Util::GetAllAddresses ( )

Returns all addresses likely accessible "from the outside".

Returns
All accessible addresses.

Definition at line 37 of file addresses.cpp.

◆ GetLocalAddresses()

UTIL_NETWORK_API AddrList_t LC::Util::GetLocalAddresses ( int  port = 0)

Returns all local addresses.

This function returns all local addresses in the UP state, serialized into a human-readable string and paired with the given given port.

The local addresses are the ones in the following subnets:

  • 10.0.0.0/8
  • 172.16.0.0/12
  • 192.168.0.0/16
Parameters
[in]portThe port to pair.
Returns
The local addresses.

Definition at line 21 of file addresses.cpp.

◆ GetSocketErrorString()

UTIL_NETWORK_API QString LC::Util::GetSocketErrorString ( QAbstractSocket::SocketError  error)

Returns an error string for the given socket error.

This function returns a human-readable localized string describing the given socket error.

Parameters
[in]errorThe socket error to describe.
Returns
The human-readable localized error string.

Definition at line 20 of file socketerrorstrings.cpp.

◆ SslError2TreeItem()

UTIL_NETWORK_API QTreeWidgetItem * LC::Util::SslError2TreeItem ( const QSslError &  error)

Builds a tree widget representation of the given SSL error.

This function creates and returns a part of the tree for the given SSL error. The ownership of the tree widget item is passed to the caller.

Parameters
[in]errorThe SSL error whose representation should be built.
Returns
The tree widget item representing the error.

Definition at line 24 of file sslerror2treeitem.cpp.