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:
parent
2fcbb9e4cb
commit
c54d71e63b
@ -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)
|
||||
{
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user