31 votes

Can I safely ignore byte order in networking?

... why would I rearrange the bytes ... when I already know that both, server and client run on little endian? Thats just unnecessary work to do. It's only unnecessary if you can guarantee your code ...
Blrfl's user avatar
  • 20.4k
19 votes
Accepted

What do we call "IP" and "port"?

You could call it an address generically, or a socket address. From Wikipedia, "A socket address is the combination of an IP address and a port number."
svidgen's user avatar
  • 14.7k
14 votes
Accepted

Connecting directly to another computer knowing only the MAC address?

If I already know the MAC address of the computer I want to connect to, is it possible to directly connect to it? Is there an example of this? You can connect at a low level and send packets to other ...
Caleb's user avatar
  • 39.2k
14 votes
Accepted

How can I discover a local network appliance and connect to its built-in webserver?

In theory, mDNS can be used for zero-configuration networking: The appliance connects normally to the available network and receives an IP address via DHCP. The appliance listens to mDNS broadcasts ...
amon's user avatar
  • 134k
13 votes
Accepted

TCP or UDP for a multiplayer game?

Depends on if you're talking about peer-to-peer, client/server with the users running the server, or client/server with a data center running the server. Only in the latter-most case is the internet ...
Kevin Fee's user avatar
  • 2,837
11 votes

Is it a good idea to multiplex blocking streams into a TCP connection?

TLDR: The major drawback you might notice when multiplexing multiple channels on top of TCP (if you do it right) is an increased latency because of head-of-line blocking between the channels. ...
ysdx's user avatar
  • 666
11 votes
Accepted

Multi-tenancy...as opposed to what?

I think your confusion is between the technical term "client" (as in client-server) and the business term "client" (as in, a paying customer). Multi-tenancy usually implies a server serving multiple ...
Avner Shahar-Kashtan's user avatar
10 votes
Accepted

Can someone implement a custom network protocol?

That's exactly the problem – intermediary routers may not understand new protocols and only forward IP packets if they look like UDP or TCP that they understand. There are actually many extensions to ...
amon's user avatar
  • 134k
10 votes

How can I discover a local network appliance and connect to its built-in webserver?

There are protocols / combinations of protocols designed for this very scenario. They broadly fall under the category of zero configuration networking aka zeroconf. Some popular implementations are ...
Jörg W Mittag's user avatar
8 votes

Can I safely ignore byte order in networking?

It's your protocol. You can't safely ignore it. But you can safely label it. You control the client and the server. You control the protocol. Doesn't it make sense not to care whether it's big-endian ...
candied_orange's user avatar
8 votes

Who or what decided conventional network timeout length?

Your co-worker is totally wrong about the relationship between timeouts and user experience. Sure, the user would like a response within a second, but they want a successful response. Changing the ...
gnasher729's user avatar
  • 45.3k
8 votes
Accepted

How do multi packet transmissions work with UDP?

I have been reading up on UDP connections There is no such thing as a "UDP connection". UDP is a connectionless protocol, that is pretty much its reason for existing in the first place. So if ...
Jörg W Mittag's user avatar
8 votes
Accepted

How are transactions on ATMs and their banks typically synchronized?

Disclaimer: For the following part, I'm saying most, because I obviously don't have experience with all banking systems. Just like any system which needs to be really fast, even banks are eventually ...
Andy's user avatar
  • 10.3k
8 votes

Where is network data stored while awaiting to be written to disk?

There would have to be quite a discrepancy in the age of the respective components, for a network adapter (and connected infrastructure) to exceed the performance of system RAM, so the premises of ...
Steve's user avatar
  • 8,793
7 votes

use of UDP in DNS

UDP provides no guarantee for delivery and no protection from duplication and is connection-less protocol but why then DNS uses UDP protocol. Because, despite having no delivery guarantees, UDP is a ...
Stephen C's user avatar
  • 25.2k
7 votes
Accepted

Implementation of DHCP protocol?

There is no one single implementation of DHCP, there are several, but the most common one is the Internet Software Consortium one, which is on github. However, reading the source is not the best way ...
pjc50's user avatar
  • 13.4k
6 votes

Can I safely ignore byte order in networking?

So, my question is: Can I safely ignore the endianess and just send little-endian data? There are two interpretations of that: If you design your applications / protocols to always1 send little-...
Stephen C's user avatar
  • 25.2k
5 votes

Can I safely ignore byte order in networking?

Various protocols used to transmit data between servers use little endian numbers: BSON Protocol Buffers Capn Proto See https://en.wikipedia.org/wiki/Comparison_of_data_serialization_formats, for ...
Winston Ewert's user avatar
5 votes
Accepted

How do async action methods maintain their network connnection?

A "connection" isn't much more than a record in a table. As long as both parties have a "plan" for routing packets from each other, the connection is "open." It doesn't require either end to have a ...
svidgen's user avatar
  • 14.7k
5 votes
Accepted

How can I avoid both objects A and B using class C (or is it unavoidable)?

When I talk to you I have to import a concept called English. It annoys me that you have to import English as well because there are all these interesting French women who refuse to import English. ...
candied_orange's user avatar
5 votes

Reverse Load Balancer: Out Balancer?

Surge Queue One close component to the "Out Balancer Coordinator" is the surge queue in AWS elastic load balancer. It is configured with SurgeQueueLength that represents he total number of ...
lennon310's user avatar
  • 3,212
5 votes
Accepted

Concurrent network I/O

It depends whether you are expecting the network to go as fast as it can, or whether you're expecting to wait most of the time. If you are downloading a large file as fast as your network can handle ...
user253751's user avatar
  • 4,873
5 votes

How does resuming downloads work?

For tracking the progress: the response to the first download request will have a Content-Length header telling the download manager how big the entire file is. That info will be persisted (and ...
marstato's user avatar
  • 4,578
5 votes
Accepted

GUID possible misuse as short term message id

I am just trying to calm my doubts about my choice. I'm afraid of no answer will calm down your doubts. It's very easy to make a list of with pros and cons of GUIDs (or synthetic IDs) and make you ...
Laiv's user avatar
  • 14.6k
5 votes
Accepted

What IP protocol number should I use for my custom IP protocol?

To work on a network with a NAT you must use a protocol the NAT supports. Usually that means TCP or UDP. Period. And you cannot just copy the protocol number. You have to actually use the protocol. ...
user253751's user avatar
  • 4,873
4 votes
Accepted

What is an appropriate pattern for handling a queue of network events in C++?

While processing the messages in the queue, you probably want to call a processing function that is specific to the most-derived type of the message you are looking at. The one place where that ...
Bart van Ingen Schenau's user avatar
4 votes
Accepted

Is SMTP client created in singleton scope or request scope?

Since the SmtpClient is not fully thread safe and can not send multiple emails at the same time, the only way to build a scalable and performant solution is to make your own pool of SmtpClient ...
bikeman868's user avatar
4 votes

TCP or UDP for a multiplayer game?

It would be an assumption to say "Internet is now pretty fast and reliable" as @Ordous pointed out, and a dangerous one too. The reason why UDP+custom protocol for delivery-critical packets does ...
onkkno's user avatar
  • 289
4 votes

What is the importance of multithreading for network applications?

Multithreading means (apparently) doing many things simultaneously. Technically, there is no particular connection of threading with networking; they are two unrelated methods which are sometimes ...
Kilian Foth's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible