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


API Reference


Brew Release
Brew MP 1.0.2
See Also
This function reads data from a socket. It reads data into one or more buffers described by the entries in the iov[] array.
This function always returns immediately. If there is no data available and the connection is still active, ISockPort_ReadV() will return IPORT_WAIT. To be notified when to call ISockPort_ReadV() again, the caller should call ISockPort_Readable().
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_ReadV(ISockPort* po, SockIOBlock iov[], uint16 wIovCount)
  • bytes_read (>0) : Any positive number indicates the total of all the bytes read into the provided buffers.
    0 (zero) : There is no more data to be received; the peer has shut down the connection.
    IPORT_WAIT : No data available now; try again later. (See ISockPort_Readable())
    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: IP 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 reading

    • 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.