翻译一下/** * @class ACE_SOCK_IO * * @brief Defines the methods for the ACE socket wrapper I/O routines * described below. * * If @a timeout == 0, then the call behaves as a normal * send/recv call, i.e., for blocking sockets, the call will * block until action is possible; for non-blocking sockets, * -1 will be returned with errno == EWOULDBLOCK if no action is * immediately possible. * If @a timeout != 0, the call will wait until the relative time * specified in *@a timeout elapses. * Errors are reported by -1 and 0 return values. If the * operation times out, -1 is returned with @c errno == ETIME. * If it succeeds the number of bytes transferred is returned. * Methods with the extra @a flags argument will always result in * @c send getting called. Methods without the extra @a flags * argument will result in @c send getting called on Win32 * platforms, and @c write getting called on non-Win32 platforms. */
时间: 2024-01-17 17:39:29 浏览: 112
ace_socket.zip_ace socket_linux 服务器
这段代码是关于 ACE_SOCK_IO 类的说明文档。如果 timeout 参数为 0,则该调用的行为类似于正常的 send/recv 调用,即对于阻塞套接字,该调用将阻塞直到有操作可以进行;对于非阻塞套接字,如果没有可以立即进行的操作,则返回 -1 并且 errno == EWOULDBLOCK。如果 timeout 参数不为 0,则调用将等待指定在 timeout 参数中的相对时间。错误将通过 -1 和 0 返回值报告。如果操作超时,则返回 -1 并且 errno == ETIME。如果成功,返回传输的字节数。带有额外 flags 参数的方法将始终导致 send 被调用。没有额外 flags 参数的方法将导致 Win32 平台上调用 send,非 Win32 平台上调用 write。
阅读全文