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

Developer

API Reference

INETMGR_OPENSOCKET()

Brew Release
Brew MP 1.0.2
See Also
Description
This function creates a socket and returns a pointer to the ISocket Interface.
Params
pINetMgr
[]:
Pointer to the INetMgr Interface object to be used to create the socket.
Type
[]:
Specifies the socket
Interface
  • INETMGR
Prototype
  •     ISocket * INETMGR_OpenSocket(INetMgr * pINetMgr, NetSocket Type)
    
Return
  • If successful, a valid pointer to the ISocket Interface
    If failed, NULL. In this case, specific error code can be retrieved by calling INETMGR_GetLastError().
    • Error Codes:

    • AEE_NET_ESOCKNOSUPPORT The specified socket type is not supported in this address
    • family.

    • AEE_NET_GENERAL_FAILURE An ISocket could not be allocated

    • Other error codes are also possible

Side Effect
  • None.
Comments
This function does not generate AEE_NET_EMFILE errors. When the limit on sockets is exceeded, a subsequent Connect(), Bind(), or SendTo() operation will fail with an AEE_NET_EMFILE error. (This behavior is due to the way that ISOCKET invisibly manages network connections ... the underlying OEM socket resources is not actually created until after the network connection is established.)