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

Developer

API Reference

ISOCKPORT_GETSOCKNAME()

Brew Release
Brew MP 1.0.2
See Also
None.
Description
This function returns the local address of the socket.
Params
po
[]:
pointer to the ISockPort interface
pAddr
[]:
an opaque pointer to the address to be filled in (see AEESockAddrStorage)
pnSize
[]:
a pointer to the size of the address. Prior to the call, this size should be initialized to the size of the space that pAddr points to. Upon return, this size will reflect the number of bytes written into pAddr.
Interface
Prototype
  •    int ISockPort_GetSockName(ISockPort* po, void* pAddr, int* pnSize)
    
Return
  • AEE_SUCCESS: pAddr has been successfully filled in with the local address
    AEE_NET_EBADF : socket is not open AEE_NET_EINVAL: socket is not bound to a local address AEE_NET_EFAULT: invalid address parameter has been specified
    Other error codes are also possible.
Side Effect
  • None.
Comments
Sockets get bound to a specific IP address only after a successful ISockPort_Bind or after a call to ISockPort_Connect. Otherwise ISockPort_GetSockName returns INADDR_ANY.