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
Tag: sockets
TCP performance differences between RH Linux and Solaris in java?
While comparing java TCP socket performance between RH Linux and Solaris, one of my test is done by using a java client sending strings and reading the replies from a java echo server. I measure the time spent to send and receive the data (i.e. the loop back round trip). The test is run 100,000 times (more occurrence are giving
Get IP address of an interface on Linux
How can I get the IPv4 address of an interface on Linux from C code? For example, I’d like to get the IP address (if any) assigned to eth0. Answer Try this: The code sample is taken from here.
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
how do I find out what program’s on the other end of a local socket?
A process on my Linux system, strace tells me, is talking on a socket which has file descriptor 10. lsof tells me that this is a unix socket with inode 11085, and netstat further tells me that inode 11085 a stream socket, and that it’s connected. Given that this process doesn’t have any other threads, there must therefore be another
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