1
0
mirror of https://gitlab.xiph.org/xiph/icecast-common.git synced 2024-12-04 14:46:31 -05:00

Implement listing of all currently connected clients on a mountpoint

svn path=/trunk/net/; revision=4434
This commit is contained in:
Michael Smith 2003-03-07 14:57:36 +00:00
parent 2fcbb9e4cb
commit c54d71e63b
2 changed files with 11 additions and 0 deletions

View File

@ -314,6 +314,15 @@ int sock_write(sock_t sock, const char *fmt, ...)
return sock_write_bytes(sock, buff, strlen(buff));
}
int sock_write_fmt(sock_t sock, char *fmt, va_list ap)
{
char buff[1024];
vsnprintf(buff, 1024, fmt, ap);
return sock_write_bytes(sock, buff, strlen(buff));
}
int sock_read_bytes(sock_t sock, char *buff, const int len)
{

View File

@ -22,6 +22,7 @@
#ifndef __SOCK_H
#define __SOCK_H
#include <stdarg.h>
#ifdef _WIN32
#include <winsock2.h>
@ -87,6 +88,7 @@ int sock_connected (int sock, unsigned timeout);
/* Socket write functions */
int sock_write_bytes(sock_t sock, const void *buff, const size_t len);
int sock_write(sock_t sock, const char *fmt, ...);
int sock_write_fmt(sock_t sock, char *fmt, va_list ap);
int sock_write_string(sock_t sock, const char *buff);
ssize_t sock_writev (int sock, const struct iovec *iov, const size_t count);