Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
Icecast-libshout
Commits
31ccaacd
Commit
31ccaacd
authored
Feb 17, 2004
by
Karl Heyes
Browse files
handle error condition at connection
svn path=/trunk/net/; revision=5833
parent
4a6460be
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/net/sock.c
View file @
31ccaacd
...
...
@@ -448,11 +448,12 @@ int sock_read_line(sock_t sock, char *buff, const int len)
}
}
/* see if a connection can be written to
** return -1 for failure
** return 0 for not yet
** return 1 for ok
*/
/* see if a connection has been established
* return SOCK_TIMEOUT for timeout
* return SOCK_ERROR for failure
* return 0 for try again, interrupted
* return 1 for ok
*/
int
sock_connected
(
int
sock
,
unsigned
timeout
)
{
fd_set
wfds
;
...
...
@@ -480,7 +481,9 @@ int sock_connected (int sock, unsigned timeout)
{
if
(
val
==
0
)
return
1
;
sock_set_error
(
val
);
}
/* fall through */
case
-
1
:
if
(
sock_recoverable
(
sock_error
()))
return
0
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment