Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
Icecast-Server
Commits
7bccdbd4
Commit
7bccdbd4
authored
Mar 22, 2002
by
Jack Moffitt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix comments (and remove old commented out code) from sock_write_bytes.
svn path=/trunk/net/; revision=3176
parent
d8559723
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
31 deletions
+2
-31
src/net/sock.c
src/net/sock.c
+2
-31
No files found.
src/net/sock.c
View file @
7bccdbd4
...
...
@@ -193,16 +193,10 @@ int sock_close(sock_t sock)
/* sock_write_bytes
**
** write bytes to the socket
** this function will block until all bytes are
** written, or there is an unrecoverable error
** even if the socket is non-blocking
** this function will _NOT_ block
*/
int
sock_write_bytes
(
sock_t
sock
,
const
char
*
buff
,
const
int
len
)
{
// int wrote, res, polled;
int
res
;
// struct pollfd socks;
/* sanity check */
if
(
!
buff
)
{
return
SOCK_ERROR
;
...
...
@@ -212,30 +206,7 @@ int sock_write_bytes(sock_t sock, const char *buff, const int len)
return
SOCK_ERROR
;
}
// socks.fd = sock;
// socks.events = POLLOUT;
// wrote = 0;
// while (wrote < len) {
// polled = poll(&socks, 1, 30000);
// if ((polled == -1) && sock_recoverable(sock_error()))
// continue;
// if (polled != 1)
// return SOCK_ERROR;
// res = send(sock, &buff[wrote], len - wrote, 0);
res
=
send
(
sock
,
buff
,
len
,
0
);
//
// if ((res < 0) && (!sock_recoverable(sock_error())))
// return SOCK_ERROR;
// if (res > 0)
// wrote += res;
// }
//
// return wrote;
return
res
;
return
send
(
sock
,
buff
,
len
,
0
);
}
/* sock_write_string
...
...
Write
Preview
Markdown
is supported
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