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


API Reference


Brew Release
Brew MP 1.0.2
See Also
This function writes data to a connected socket. It gathers data from one or more buffers described by the entries in the iov[] array into a single write operation. Behaviour can differ from separate calls to ISockPort_Write() in that multiple calls to ISockPort_Write() might unnecessarily generate multiple packets.
This function always returns immediately with the number of bytes that were successfully written. If no bytes could be successfully written and the connection is still active, ISockPort_WriteV() will return IPORT_WAIT. To be notified when to call ISockPort_WriteV() again, the caller should call ISockPort_Writeable().
pointer to the ISockPort interface
an array of SockIoBlock structures into which data can be read
specifies the number of entries in the iov array
  •    int32 ISockPort_WriteV(ISockPort* po, const SockIOBlock iov[], uint16 wIovCount)
  • bytes_written (>0): Any positive number indicates the total number of bytes successfully written from all of the iov[] buffers.
    IPORT_WAIT : No bytes could be written at this time; try again later. (See ISockPort_Writeable())
    IPORT_ERROR : the specific error code can be retrieved by calling ISockPort_GetLastError():
    • AEE_NET_EBADF : socket is not open
    • AEE_NET_ENOTCONN : socket not connected
    • AEE_NET_ECONNRESET : connection reset by server
    • AEE_NET_ECONNABORTED : connection aborted due to timeout or other failure
    • AEE_NET_EIPADDRCHANGED: address changed, causing connection reset
    • AEE_NET_EPIPE : broken pipe
    • AEE_NET_ENETDOWN : network subsystem unavailable
    • AEE_NET_EFAULT : invalid address parameter has been specified
    • AEE_NET_EINVAL : not a stream socket
    • AEE_NET_ESHUTDOWN : socket is shutdown for writing

    • Other error codes are also possible.
Side Effect
  • None.
Note that the IPORT_WAIT return value is used instead of an error return value and an AEE_NET_EWOULDBLOCK error code.