Skip to content

Tag: sockets

Using linux sockets the QT way?

I have been googling this, but I can’t seems to find it. Is there a QT way to use linux sockets? It looked like the QSocket class is used for network sockets and not for local linux sockets. Anyone knows anything about this? And maybe a tutorial to get started? Answer QSocket ? I think you’re look…

struct ip_mreq disappears when compiling with -std=c99

On some of our linux boxes compiling with gcc -std=c99 makes struct ip_mreq disappear (included from netinet/in.h) Is there some other interface we are supposed to use ? Answer Try –std=gnu99. The default for GCC is ‘–std=gnu89’ which means C89 with GNU extensions. By selecting ‘…

Is it possible to unlisten on a socket?

Is it possible to unlisten on a socket after you have called listen(fd, backlog)? Edit: My mistake for not making myself clear. I’d like to be able to temporarily unlisten on the socket. Calling close() will leave the socket in the M2LS state and prevent me from reopening it (or worse, some nefarious pr…