API Reference


Brew Release
Brew MP 1.0.2
See Also
ISockPort_OpenEx() Data networks Socket Address Family
This function selects a specific data network.
This function deprecates ISockPort_SelectNetwork().
  • me
    the interface pointer
  • nNetwork
    data network type (AEE_NETWORK_*)
  • nFamily
    network address family (AEE_AF_*). If ISockPort_OpenEx() was already called for this socket, nFamily should match the address family that was requested for the socket.
   int ISockPort_SelectNetworkEx(ISockPort *me, int nNetwork, int16 nFamily)
AEE_SUCCESS: the data network was selected AEE_NET_EINVAL: the network is not valid AEE_NET_EOPNOTSUPP: the network has already been selected. AEE_EFAILED: other error.
Other error codes are also possible.
Side Effect
Most applications will not need to explicitly select the network.
When an ISockPort instance is created, no network is selected. If an ISockPort method that requires a network is called before ISockPort_SelectNetworkEx(), AEE_NETWORK_DEFAULT and the socket's family (or AEE_AF_INET if it's unspec) will be implicitly selected, and the decision of which network to actually use is deferred to lower layers. Decision will be made upon connection creation, depending on the device and/or service provider.
Once a network has been selected, either explicitly via ISockPort_SelectNetworkEx(), or implicitly as described above, the network may not be changed. To use a different network, a new ISockPort instance is required.
  • Follow