API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

ISOCKPORT_SELECTNETWORK()

Brew Release
Brew MP 1.0.2
See Also
Data networks
Description
Selects a specific data network.
Params
po
[]:
pointer to the ISockPort interface
nNetwork
[]:
data network (AEE_NETWORK_*)
Interface
Prototype
  •    int ISockPort_SelectNetwork(ISockPort* po, int nNetwork)
    
Return
  • AEE_SUCCESS : network has been successfully selected
    AEE_NET_EINVAL : network is not valid AEE_NET_EOPNOTSUPP: network has already been selected
    Other error codes are also possible.
Side Effect
  • None.
Comments
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_SelectNetwork(), 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_SelectNetwork(), or implicitly as described above, the network may not be changed. To use a different network, a new ISockPort instance is required.