Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [udp]

User Datagram Protocol is one of the messaging protocols of the IP protocol stack. With UDP, computer applications can send messages to other hosts on an Internet Protocol (IP) network without requiring prior communications to set up special transmission channels or data paths.

4
votes
0answers
45 views

Python UDP server to relay CSV or JSON data to cloud for analysis

What am I doing? UDP/TCP server in Python (2.7 / 3.7) How am I doing? Using threads Where am I going to execute it? In a virtual machine running linux in AWS or Google Cloud or Azure () ...
5
votes
1answer
279 views

Non-blocking TCP and UDP in Unity3D Game Engine

I would like constructive criticism of a networking plugin I've written for Unity 3D. The use-case of the code is for people in "creative coding," where simple TCP and UDP messages are used for ...
6
votes
2answers
482 views

UDP Reverse Shell

I'm currently learning python / network programming altogether and I coded this simple python reverse shell; I would like to hear any remarks from you regarding code structure, any common beginner ...
2
votes
1answer
150 views

A send and receive UDP node in C

I am working on a (personal) light weight distributed project for the Rpi platform. Making it distributed requires P2P communication between the nodes, and I thought it would be a good time to learn ...
2
votes
1answer
754 views

UDP timeout detector

Camera streaming app for the pizero, hobby project. I want the cam to be sending frames only if there is an active client on the other end. For this purpose the cam is listening on a port for client ...
13
votes
1answer
268 views

Game-oriented UDP protocol

As part of a small multiplayer game project I designed a generic (and not too complex) protocol (used over udp). The game is 2D, has physics-based elements (e.g. rigid body, smoke) and should be ...
6
votes
1answer
819 views

SFML-based chat in C++

I wanted to get some review on this code I wrote. The repo is here if you want to download the CodeBlocks project. This program is several things: it is a console using SFML graphics; it is a console ...
7
votes
1answer
1k views

Real time UDP packet decoder

I have basic C++ lectures at a university and I don't really know how I can optimize this line of code for a real-time application (I call this function every 5 ms for UDP packet decoding). I would ...
6
votes
3answers
951 views

Python UDP class to control drone

I'm currently building a small plane with Raspberry Pi Zero W. I wrote a small code which uses UDP to control it. Here I'm resending packets regularly in a thread because of the joystick input (it ...
2
votes
1answer
5k views

Implementation of an asynchronous UDP server Listener

I have written this code in C# and have tested this code to ensure it works well. Any other suggestions for this code would be appreciated as I have a number of users who are sending data on this port....
2
votes
1answer
663 views

Semi-Reliable Communications Using UDP

I'm writing a communications library for a class. Part of the requirements is that semi-reliable communications, which leads me to this monstrosity: ...
1
vote
1answer
401 views

Handling errors in a Python UDP proxy [closed]

The following (stripped) program receives UDP packets on port 5000 and forwards them to port 5001. It may throw socket errors on startup (e.g.: if the port is already in use), but I am not too worried ...
10
votes
2answers
2k views

Thread to send heartbeat UDP packets

This C code will run on an embedded machine with a Linux OS. It should create data packets (ASCII) to repeatedly be sent to a UDP server. Just to give an overview about what functions should do: <...
3
votes
0answers
377 views

Event-driven UDP listener wrapper

I wrote this wrapper around the UdpClient,using events for new datagrams: ...
2
votes
0answers
1k views

UDP server for a multiplayer game using socketserver

I am making a multiplayer platforming game, and currently there are server performance issues once I have about 7+ clients connected. I was told earlier last week that I should investigate ...
5
votes
1answer
5k views

UDP Server Design and Performance

What I'm doing I am writing a server to work as my games backend. The server is being written in C# using UDP as the protocol, while the game is in C++. The biggest thing I've been focusing on was ...
0
votes
1answer
63 views

Playing audio from two data sources

I want to play some audio of two byte arrays. I was wondering whether it would be better to play them as two separate arrays both calling the method, or to put them into one array and play it from ...
9
votes
1answer
1k views

UDP Server class

For my current project I need a basic UDP server. The first priority is to make it as fast, but as resource friendly as possible (it will be run on Raspberry Pi-like devices). I would like a review ...
19
votes
2answers
289 views

Select external resource to feed data into a processing function

I wrote an application a while back to plan and manage drones races. (Well, it could be anything with identification numbers going through checkpoints.) At that time, communication between the gates (...
3
votes
3answers
1k views

Simple UDP server/client written in Python to report back IP address

I'd like to get some feedback/criticism on my attempt to write a simple client/server application that reports back the (client's) global IP address. It would be nice if you could comment on the UDP ...
6
votes
2answers
4k views

Multithreaded Network Server

I would like the following code reviewed: I am trying to create a local server which listens indefinitely and provides the latest information. The server runs another while loop which fetches ...
10
votes
2answers
2k views

Gossip algorithm in distributed systems

I have implemented the gossip algorithm in distributed systems for review. Gossip class ...
37
votes
1answer
1k views

Utility that decodes and logs UDP packets

I have written the following utility, as my first non-tutorial program in Go. The purpose of the utility is to connect to a torque/force sensor (aka load-cell) via UDP; to send an initialization ...
4
votes
2answers
1k views

Logging to a File vs UDP

I'm trying to understand where my ruby implementation of this fails and hoping for an expert to shed some light on this situation. I've tried to make this a very simple example with the idea that ...
5
votes
2answers
2k views

High udpclient CPU use

I have a bunch of different ports I want to listen on and the iterate over the available data to send to a Dataflow pipeline. In total I'm listening on 14 ports. I'm looking for any advice on how to ...
6
votes
1answer
594 views

Good usage of MailboxProcessor/Agent in class rather than mutable field?

I've written a simple Simple Service Discovery Protocol (SSDP) module. This module contains a class, Session that you create and then use to issue commands and ...
6
votes
1answer
610 views

Blocking and async UDP communication with an IR camera

I'm writing a Java application to control a custom IR research camera that will be installed on an aircraft. The camera connects to the the computer using UDP sockets via a direct LAN cable. The ...