Skip to content
Advertisement

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 looking at the wrong

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 ‘–std=c99’ you are enabling C99, but disabling the GNU extensions. ‘–std=gnu99’ will select both C99

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 program could bind to that socket) Temporarily

Advertisement