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().
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.