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

Developer

API Reference

ISOCKET_SHUTDOWN()

Brew Release
Brew MP 1.0.2
See Also
ISOCKET_Writeable()
Description
This function causes all or part of a full-duplex connection to be terminated gracefully.
  • If nHow is AEE_SHUTDOWN_RD, no more reads are allowed.
  • If nHow is AEE_SHUTDOWN_WR, no more writes are allowed (AKA half-close).
  • If nHow is AEE_SHUTDOWN_RDWR, both read and write are disallowed.

  • NOTE: This function shuts down the socket for TCP sockets only, but it returns
  • an error message for UDP sockets.
Params
ps
[]:
Pointer to the ISocket interface to shutdown
nHow
[]:
Dictates which portion(s) of the connection to shutdown
Interface
  • ISOCKET
Prototype
  •     int ISOCKET_Shutdown(ISocket * ps, int nHow);
    
Return
  • AEE_NET_SUCCESS: The socket has been successfully shutdown. (See ISOCKET_Writeable().)
    AEE_NET_WOULDBLOCK: Shutdown in progress
    Use ISOCKET_Readable() for AEE_SHUTDOWN_RD
    or ISOCKET_Writeable() for AEE_SHUTDOWN_WR
    or AEE_SHUTDOWN_RDWR to be notified when to try again.
    AEE_NET_ERROR: The operation failed. The specific error code can be retrieved by calling ISOCKET_GetLastError().
Side Effect
  • None.
Comments
This is not a formal member of ISocket, instead it is a wrapper around ISOCKET_IOCtl()