Questions tagged [sockets]

a data structure that provides access to inter-process communication. For the past 40 years, this basically means network communication.

A data structure that provides access to inter-process communication. Originally designed to operate on a single machine (before networking was common), then co-opted to make the Internet possible. Variations like IPX/SPX were developed for Local Area Networks and Wide Area Networks to get around intellectual property restrictions in the early-to-middle timeframe of Unix popularity.

134 questions
133
votes
6 answers

Difference between a socket and a port

Could someone please explain quite clearly the difference between a port and a socket. I know that a port serves as a door into the network for an application process and that the application process uses a socket connection to the given port…
cobie
  • 3,237
  • 5
  • 23
  • 21
21
votes
3 answers

Simple explanation of the Unix sockets

I can search and I've already looked at the wikipedia entry and in some other places, but even though I have some programming experience, I don't really grasp the concept. Can you treat me like a 10 year old and give me a clear explanation on socket…
Elzo Valugi
  • 308
  • 1
  • 2
  • 9
18
votes
3 answers

Difference between networking programming and socket programming

Are there any major differences when we talk about "socket programming" compared to "network programming"? Are there some topics that cover "network programming" but not "socket programming"?
Aquarius_Girl
  • 1,601
  • 2
  • 18
  • 25
17
votes
2 answers

Why can't sockets be used to identify individuals instead of cookies?

Another question was asked regarding the use of IP addresses to identify individual clients. I think I understand why an IP address is insufficient. But what about the socket, which has more information and, from what I understand, is stateful? …
user266715
15
votes
1 answer

How do sockets work over wireless connections?

I've only worked on client side(specifically, mobile) applications using Android, where all networking is handled at the HTTP layer using framework provided components like HttpUrlConnection. But push messaging systems like Websockets/XMPP etc, all…
Vinay S Shenoy
  • 261
  • 2
  • 7
15
votes
1 answer

What did network programs use to communicate before sockets was invented (around 1983?)

Sockets were invented in Berkeley around 1983, but how did networked computer programs work before this? These days, pretty much everything uses sockets, so it's hard for me to imagine how else programs could communicate and Google turned up…
talloaktrees
  • 273
  • 1
  • 6
14
votes
4 answers

How to handle Real Time Data from a database perspective?

I have an idea in mind, but it still confuses me the database area. Imagine that I want to show real time data, and using one of the latest browser technologies (web sockets - even using older browsers) it is very easy to show to all observables…
balexandre
  • 243
  • 3
  • 8
11
votes
3 answers

Is there an alternative to HTML Web Sockets, now that Firefox 4 has disabled them?

I've been checking out some of the latest multiplayer engines in HTML all supporting multi-user games (Very nice) - I believe all these engines use Web Sockets for communication. That’s why we’ve decided to disable support for WebSocket in…
LiamB
  • 658
  • 1
  • 7
  • 16
10
votes
2 answers

What are the pros and cons of Inter process communication done via sockets vs shared memory?

I understand that two of the many more options for inter process communication can be : Shared memory Sockets Actually I saw these two options being exposed by Intellij Idea for debugging a Java application . I want to know what are the pros and…
Geek
  • 5,107
  • 8
  • 40
  • 58
8
votes
1 answer

Does it ever make sense to read from and/or write to a bound, listening socket?

I'm experimenting a little with creating a socket server, in PHP. In doing so I'm trying to abstract away the kinds of sockets I think I'll be needing, that I've tentitively named: ListenSocket — the 'master' socket, that is bound to an…
Decent Dabbler
  • 570
  • 2
  • 16
8
votes
5 answers

Is there a problem holding large numbers of open socket connections for lengthy periods of time?

The application we have in mind is a relay server. The aim is to accept large numbers of incoming socket connections (at least thousands) that will stay open for lengthy periods (hours or maybe days). They will exchange modest quantities of data and…
david.pfx
  • 8,105
  • 2
  • 21
  • 44
8
votes
7 answers

UDP order of packets with direct connection

If i have two systems (A and B) running on LAN(INTRANET) which are directly connected. There are no routers in the middle. In this case, if system A sends a few UDP packets every few milliseconds to system B: Is it possible that system B receives…
m4n07
  • 241
  • 2
  • 3
  • 5
7
votes
5 answers

How do I balance 100 clients checking the same database table in a loop?

What I have This is a prototype. I have a pool of 100 clients connected to the server via websockets reporting things and awaiting for commands. The server polls the commands database table of type MEMORY in a loop using a query with WHERE…
7
votes
5 answers

Serializing Data Structures in C

I've recently read three separate books on algorithms and data structures, tcp/ip socket programming, and programming with memory. The book about memory briefly discussed the topic of serializing data structures for the purposes of storing it to…
Nocturno
  • 179
  • 1
  • 1
  • 4
7
votes
2 answers

How to match responses from a server with their corresponding requests?

There is a server that responds to requests on a socket. The client has functions to emit requests and functions to handle responses from the server. The problem is that the request sending function and the response handling function are two…
Deele
  • 391
  • 1
  • 3
  • 8
1
2 3
8 9