Skip to main content

Crate ohos_net_connection_sys

Crate ohos_net_connection_sys 

Source

Structs§

NetConn_ConnectionProperties
@brief Defines the network connection properties.
NetConn_HttpProxy
@brief Defines the proxy configuration information.
NetConn_NetAddr
@brief Defines the network address.
NetConn_NetCapabilities
@brief Defines all network capabilities.
NetConn_NetConnCallback
@brief Defines the network connection callbacks.
NetConn_NetHandle
@brief Defines the network handle.
NetConn_NetHandleList
@brief Defines the network handle list.
NetConn_NetSpecifier
@brief Definition of network specifier.
NetConn_Route
@brief Defines the route configuration information.
addrinfo
sockaddr

Constants§

NETCONN_MAX_ADDR_SIZE
NETCONN_MAX_BEARER_TYPE_SIZE
NETCONN_MAX_CAP_SIZE
NETCONN_MAX_EXCLUSION_SIZE
NETCONN_MAX_NET_SIZE
NETCONN_MAX_ROUTE_SIZE
NETCONN_MAX_RTT_NUM
NETCONN_MAX_STR_LEN
NetConn_NetBearerType_NETCONN_BEARER_BLUETOOTH
Bluetooth @since 12
NetConn_NetBearerType_NETCONN_BEARER_CELLULAR
Cellular network
NetConn_NetBearerType_NETCONN_BEARER_ETHERNET
Ethernet
NetConn_NetBearerType_NETCONN_BEARER_VPN
VPN @since 12
NetConn_NetBearerType_NETCONN_BEARER_WIFI
WIFI
NetConn_NetCap_NETCONN_NET_CAPABILITY_CHECKING_CONNECTIVITY
In checking network connectivity. @since 12
NetConn_NetCap_NETCONN_NET_CAPABILITY_INTERNET
Internet
NetConn_NetCap_NETCONN_NET_CAPABILITY_MMS
MMS
NetConn_NetCap_NETCONN_NET_CAPABILITY_NOT_METERED
Not Metered
NetConn_NetCap_NETCONN_NET_CAPABILITY_NOT_VPN
Not VPN
NetConn_NetCap_NETCONN_NET_CAPABILITY_PORTAL
Portal @since 12
NetConn_NetCap_NETCONN_NET_CAPABILITY_VALIDATED
Validated

Functions§

OH_NetConn_BindSocket
@brief Binds a socket to the specific network.
OH_NetConn_FreeDnsResult
@brief Free DNS result.
OH_NetConn_GetAddrInfo
@brief Get DNS result with netId.
OH_NetConn_GetAllNets
@brief Queries all activated data networks.
OH_NetConn_GetConnectionProperties
@brief Obtains the connection properties of a data network.
OH_NetConn_GetDefaultHttpProxy
@brief Obtains the default http proxy.
OH_NetConn_GetDefaultNet
@brief Obtains the default activated data network.
OH_NetConn_GetNetCapabilities
@brief Obtains the capabilities of a data network.
OH_NetConn_HasDefaultNet
@brief Checks whether a default activated data network is available.
OH_NetConn_IsDefaultNetMetered
@brief Checks whether metering is enabled for the default data network.
OH_NetConn_RegisterAppHttpProxyCallback
@brief Registers callback to listen for changes to the application-level http proxy.
OH_NetConn_RegisterDefaultNetConnCallback
@brief Registers a callback to listen default network’s status changed.
OH_NetConn_RegisterNetConnCallback
@brief Registers callback, used to monitor specific network status.
OH_NetConn_SetAppHttpProxy
@brief Sets http proxy information to current application.
OH_NetConn_UnregisterAppHttpProxyCallback
@brief Unregisters a callback function that listens for application-level proxy changes.
OH_NetConn_UnregisterNetConnCallback
@brief Unregisters network status callback.

Type Aliases§

NetConn_NetBearerType
@brief Defines network bearer types.
NetConn_NetCap
@brief Defines network capabilities.
OH_NetConn_AppHttpProxyChange
@brief Callback for application’s http proxy information changed.
OH_NetConn_CustomDnsResolver
@brief Pointer to the custom DNS resolver.
OH_NetConn_NetBlockStatusChange
@brief Callback for network blocked status changed.
OH_NetConn_NetCapabilitiesChange
@brief Callback for network capabilities changed.
OH_NetConn_NetConnectionPropertiesChange
@brief Callback for network connection properties changed.
OH_NetConn_NetLost
@brief Callback for network lost.
OH_NetConn_NetUnavailable
@brief Callback for network unavailable, this function invoked while network can not be available in given timeout.
OH_NetConn_NetworkAvailable
@brief Callback for network available.
sa_family_t
socklen_t