KDECore
Go to the documentation of this file. 25 #ifndef KDE_SYSSOCKET_H 26 #define KDE_SYSSOCKET_H 29 #error syssocket.h must be included before ksocketbase.h! 39 #include <sys/types.h> 40 #include <sys/socket.h> 41 #include <sys/ioctl.h> 58 inline int kde_socket(
int af,
int style,
int protocol)
60 return ::socket(af, style, protocol);
64 inline int kde_bind(
int fd,
const struct sockaddr* sa, socklen_t len)
66 return ::bind(fd, sa, len);
70 inline int kde_listen(
int fd,
int backlog)
76 inline int kde_connect(
int fd,
const struct sockaddr* sa, socklen_t len)
78 return ::connect(fd, (
struct sockaddr*)sa, len);
82 inline int kde_accept(
int fd,
struct sockaddr* sa, socklen_t* len)
84 return ::accept(fd, sa, len);
88 inline int kde_getpeername(
int fd,
struct sockaddr* sa, socklen_t* len)
90 return ::getpeername(fd, sa, len);
94 inline int kde_getsockname(
int fd,
struct sockaddr* sa, socklen_t* len)
96 return ::getsockname(fd, sa, len);
100 inline int kde_ioctl(
int fd,
int cmd,
int* argp)
102 #if defined _WIN32 || defined _WIN64 103 unsigned long l_argp = *argp;
104 int iRet = ::ioctlsocket(fd, cmd, &l_argp);
105 *argp = (int) l_argp;
108 return ::ioctl(fd, cmd, argp);
QTcpServer * listen(const QString &protocol, const QHostAddress &address=QHostAddress::Any, quint16 port=0, QObject *parent=0)
Opens a TCP/IP socket for listening protocol protocol, binding only at address address.
This file is part of the KDE documentation.
Documentation copyright © 1996-2018 The KDE developers.
Generated on Tue Aug 21 2018 18:45:09 by
doxygen 1.8.14 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.