Home | History | Annotate | Download | only in browser

Lines Matching defs:timeout

160 // Wait a socket for read for a certain timeout in seconds.
161 // Returns -1 if error occurred, 0 if timeout reached, > 0 if the socket is
163 int WaitSocketForRead(int fd, int timeout) {
169 tv.tv_sec = timeout;
175 // Read a message from a socket fd, with an optional timeout in seconds.
176 // If |timeout| <= 0 then read immediately.
178 ssize_t ReadFromSocket(int fd, char *buf, size_t bufsize, int timeout) {
179 if (timeout > 0) {
180 int rv = WaitSocketForRead(fd, timeout);
827 timeval timeout = {timeout_seconds, 0};
828 setsockopt(socket.fd(), SOL_SOCKET, SO_SNDTIMEO, &timeout, sizeof(timeout));
859 // timeout, to make sure the other process has enough time to return ACK.