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

Developer

API Reference

ISOCKET_IOCTL()

Brew Release
Brew MP 1.0.2
See Also
ISOCKET_Accept() ISOCKET_Close() ISOCKET_GetOpt() ISOCKET_GetSockName() ISOCKET_Listen() ISOCKET_Realize() ISOCKET_SetOpt() ISOCKET_Shutdown()
Description
This function allows some control over the behavior of an ISocket, for example connect time-outs. Its form is analogous to SYSV's ioctl, with encoded arguments that should be specified with the _IOCTL_ macros listed here. Its intended use is for special, out-of-object-signature behavior. For that reason, it is generic.
Params
pISocket
[]:
Pointer to the ISocket interface
nOption
[]:
The option id
dwVal
[]:
The option value
Interface
  • ISOCKET
Prototype
  •     int ISOCKET_IOCtl(ISocket * pISocket, int nOption, uint32 dwVal);
    
Return
  • SUCCESS: the option id is known and the specified operation succeeds EUNSUPPORTED: the option id was unrecognized
    Other error code, depending on the option id specified
Side Effect
  • None.
Comments
Currently supported option ids are: ISOCKET_IOCTL_ACCEPT dwVal set to a pointer to pointer to ISocket, which is filled in with the newly connected socket (see ISOCKET_Accept()) ISOCKET_IOCTL_CLOSE dwVal is unused (see ISOCKET_Close()) ISOCKET_IOCTL_GCLOSER dwVal set to a pointer to an ISocketCloser struct, which will be filled with the ISocket's current sock closer callback ISOCKET_IOCTL_GCONNTIMEOUT dwVal set to a pointer to an uint32, which will be filled in with the current time in milliseconds to wait for connect to succeed ISOCKET_IOCTL_GDBGMARK dwVal set to a pointer to an ISocketDbgMark, which is filled with the current ISocket's mark (if any) ISOCKET_IOCTL_GETSOCKOPT dwVal set to a pointer to an AEESockOpt (see ISOCKET_GetOpt()) ISOCKET_IOCTL_GETSOCKNAME dwVal set to a pointer to an INSockAddr (see ISOCKET_GetSockName()) ISOCKET_IOCTL_LISTEN dwVal set to an int indicating the max backlog (see ISOCKET_Listen()) ISOCKET_IOCTL_QI dwVal set to a pointer to an ISocketQI, to do QueryInterface() ISOCKET_IOCTL_REALIZE dwVal is unused (see ISOCKET_Realize()) ISOCKET_IOCTL_SCLOSER dwVal set to a pointer to an ISocketCloser struct, which specifies the ISocket'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. ISOCKET_IOCTL_SCONNTIMEOUT dwVal set to time in milliseconds (zero for default) to wait for connect to succeed ISOCKET_IOCTL_SDBGMARK dwVal set to a pointer to an ISocketDbgMark, specifies how to mark the ISocket (see ISocketDbgMark) ISOCKET_IOCTL_SETSOCKOPT dwVal set to a pointer to an AEESockOpt (see ISOCKET_SetOpt()) ISOCKET_IOCTL_SHUTDOWN dwVal set to an int indicating how to shutdown (AEE_SHUTDOWN_*) (see ISOCKET_Shutdown())