r/NetworkProgramming • • Sep 14 '20

A questions of sequencing :D

1 Upvotes

Another question. For sequencing, I'm just going to up the number on each send for client and on server. If a sequence appears that's higher og lower than expected, the packet is dropped. I only want to support the latest packet for non-guaranteed UDP, as I want to exploit this in my game, for easier handling. So important events are guaranteed, but say and input/movement event, you don't want the old data :)

So I guess the question is, should there be a sequence for each packet type? Since we only want the latest of a certain packet? And what happens when the sequence number wraps? I know an integer will take some two years to do that, but maybe the client and server could agree on when to wrap? But that could cause en issue if there is a slight mismatch between the client and server (it is UDP after all), which could cause the wrapped packet to be rejected, but maybe that would sort itself out after a few packets? ;)


r/NetworkProgramming • • Oct 18 '20

Best place to start network Programming

3 Upvotes

I need to learn network programming, and Unix sockets. I want to be able to understand about IP addresses, Subnet masks, TCP/IP. HTTP, UDP, FTP, SFTP, SSH, network interfaces, MAC addresses, broadcasting, multicasting. statis IP addresses, DHCP.....I could carry on forever, I have been dealing with these concepts without really understanding them. I'd like to study about these things and understand what it's really going on.

Could anyone recommend a very good tutorial, online course, classical book?

I am a c++ programmer, so if it is something with C++ examples/exercises even better. I can also do Python.

Thanks


r/NetworkProgramming • • Jul 08 '21

Check out what I wrote for decentralizing services:

5 Upvotes

https://github.com/rand3289/OutNet

I made this thing for decentralizing any type of services or servers. It provides peer discovery and identity. What do you guys think?


r/NetworkProgramming • • Feb 21 '22

Understanding udp monitoring

2 Upvotes

I’m considering developing a custom IRL streaming bonding solution so that I can round Robin UDP through SRT on 3 or more cellular modems to my home Pc where I will reconstruct, send to OBS and then finally out to RTMP. All of which so I can live stream my big European motorcycle trip to twitch/YouTube.

Now.. I don’t know if I need to factor packet retransmission into my bonding software? Given that SRT works over UDP then I assume that, so long as I forward the same length as the packet header dictates to a particular modem (so that a discrete header + data payload is not separated on different modems) then I do not need to request retransmission (although something to score and factor out badly performing cellular modems might prove useful).

SRT apparently has some monitoring and descaling built in but (and this is my main question) how can it know? If it’s over UDP (and it definitely is)?

I always thought that UDP was fire and forget; you don’t know if the traffic reached its peer.

However… this assumption must be wrong I think? Because a quick google on ‘How to detect if network is dropping UDP packets?’ shows answers which use netcat to connect to endpoints over udp.

Where am I going wrong with my understanding?

Any help appreciated