An endpoint of a bidirectional inter-process communication flow. This often refers to a process flow over a network connection, but by no means is limited to such.

learn more… | top users | synonyms (3)

88
votes
4answers
35k views

How much overhead does SSL impose?

I know there's no single hard-and-fast answer, but is there a generic order-of-magnitude estimate approximation for the encryption overhead of SSL versus unencrypted socket communication? I'm talking ...
36
votes
4answers
19k views

What is the difference between AF_INET and PF_INET in socket programming?

What is the difference between AF_INET and PF_INET in socket programming? I'm confused between using AF_INET and PF_INET in socket() and bind(). Also, how to give ip-address in sin_addr field?
27
votes
1answer
7k views

Socket options SO_REUSEADDR and SO_REUSEPORT, how do they differ? Do they mean the same across all major operating systems?

The man pages and programmer documentations for the socket options SO_REUSEADDR and SO_REUSEPORT are different for different operating systems and often highly confusing. Some operating systems don't ...
27
votes
4answers
20k views

How can I check whether a (TCP) socket is (dis)connected in C#?

How should I check a (TCP) socket to find out whether it is connected? I have read about the Socket.Connected property in MSDN, but it says it only shows the state according to the last I/O. This ...
24
votes
3answers
22k views

Get IP address of an interface on linux

How can I get the IPv4 address of an interface in linux from C code ? e.g. I'd like to get the IP address(if any) assigned to eth0
23
votes
8answers
234k views

What's causing my java.net.SocketException: Connection reset?

We are seeing frequent java.net.SocketException: Connection reset errors in our logs for a component that calls a third party Web service that sends SMS messages. Our application is written in Java ...
22
votes
10answers
18k views

Tips / techniques for high-performance C# server sockets

I have a .NET 2.0 server that seems to be running into scaling problems, probably due to poor design of the socket-handling code, and I am looking for guidance on how I might redesign it to improve ...
20
votes
0answers
1k views

UDP multicast group on Windows Phone 8

OK this is one I've been trying to figure out for a few days now. We have an application on Windows Phone 7 where phones join a multicast group and then send and receive messages to the group to talk ...
18
votes
6answers
26k views

How to set socket timeout in C when making multiple connections?

I'm writing a simple program that makes multiple connections to different servers for status check. All these connections are constructed on-demand; up to 10 connections can be created simultaneously. ...
17
votes
2answers
1k views

AF_UNIX socket overhead?

I'm seeing a couple strange things with a pair of AF_UNIX sockets created by a call such as: socketpair(AF_UNIX, SOCK_STREAM, 0, sfd); Where sfd is an int[2] array for the file descriptors. ...
15
votes
3answers
3k views

Do TCP connections get moved to another port after they are opened?

If a TCP socket server listens on port 28081 for incoming connections and then accepts a connection and start receiving data. Is the port that data is coming into still 28081 or does the port get ...
14
votes
2answers
5k views

Turn a simple Socket into an SSL Socket

I wrote simple c programs, which are using sockets ('client' and 'server'). (UNIX/Linux usage) The server side simply creates a socket: sockfd = socket(AF_INET, SOCK_STREAM, 0); and then binds ...
12
votes
8answers
16k views

How do I output my host’s IP addresses from a C program?

I need to display all the IP addresses from my local computer, using the C language. How can this be done? Thanks.
12
votes
2answers
13k views

PHP Socket Server vs node.js: Web Chat

I want to program a HTTP WebChat using long-held HTTP requests (Comet), ajax and websockets (depending on the browser used). Userdatabase is in mysql. Chat is written in PHP except maybe the chat ...
11
votes
6answers
5k views

Detect socket hangup without sending or receiving?

I'm writing a TCP server that can take 15 seconds or more to begin generating the body of a response to certain requests. Some clients like to close the connection at their end if the response takes ...

1 2 3 4 5 1243
15 30 50 per page