Developer

API Reference

ISockPort_IOCtl()

Brew Release
Brew MP 1.0.2
See Also
Socket Protocols
Description
This function allows some control over the behavior of an ISockPort, e.g. setting/getting configuration.
It's form is analogous to SYSV's ioctl, with encoded arguments that should be specified with the *_IOCTL_* macros listed here. It's intended use is for special, out-of-object-signature behavior. For that reason, it's super-generic.
Parameters
  • po
    []:
    pointer to the ISockPort interface
  • nOption
    []:
    the option id
  • dwVal
    []:
    option value
Interface
Prototype
   int ISockPort_IOCtl(ISockPort* po, int nOption, uint32 dwVal);
Return
AEE_SUCCESS : the option id is known and the operation succeeded
AEE_NET_EBADF : socket is not open AEE_EUNSUPPORTED : the option id was unrecognized
Other error codes are also possible.
Side Effect
None.
Comment
All address families support the following option ids:
SOCKPORT_IOCTL_SDBGMARK - dwVal set to a pointer to an ISockPortDbgMark, specifies how to mark the ISockPort.
SOCKPORT_IOCTL_GDBGMARK - dwVal set to a pointer to an ISockPortDbgMark, which will be set to the current ISockPort's mark (if any)
Additionally, AEE_AF_INET and AEE_AF_INET6 support the following option ids:
SOCKPORT_IOCTL_SCLOSER - dwVal set to a pointer to an AEECallback struct, which specifies the ISockPort's new closer callback. The callback is called when BREW networking would like to bring down the BREW data network, so the client is expected to close the socket in order to allow that to happen. This is needed since bound sockets will prevent the BREW networking network linger mechanism from closing the associated BREW data network.
SOCKPORT_IOCTL_GCLOSER - dwVal set to a pointer to a pointer to an AEECallback struct (AEECallback**), which will be set to ISockPort's current closer callback
SOCKPORT_IOCTL_SCONNTIMEOUT - dwVal set to time in milliseconds (zero for default) to wait for connect to succeed
SOCKPORT_IOCTL_GCONNTIMEOUT - dwVal set to a pointer to an uint32, which will be set to the current time in milliseconds to wait for connect to succeed, Values larger then 0x80000000 indicate unlimited timeout
  • Follow