Questions tagged [networking]

Networking is associated with creating and managing networks as well as adding network connectivity to a (set of) programs.

Filter by
Sorted by
Tagged with
13
votes
1answer
332 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 ...
68
votes
4answers
10k views

Send a tweet to ISP when internet speed drops

I have written an app in Python 3 which monitors internet speed and will send a tweet to an ISP when the speed drops too low. The app has a config file where the ISP and target speeds can be ...
4
votes
1answer
375 views

Flexible TCP socket framework

I'm working on a flexible socket framework and trying to polish it so it's actually something usable in further development. Would really appreciate any critique, also I’m really interested whether I'...
1
vote
0answers
268 views

Thread-safe IDisposable Tcp Connection Manager

I'm trying to implement a thread-safe Connection Manager. I've split my class in two files, one with TraceMessages and another with the actual implementation. I'm just going to post the file with the ...
3
votes
1answer
198 views

Get external IP and update ddns service

I've created a cli application that consists of a package with 2 functions. One to get the external ip address, and another function to update a dynamic dns record at dns.he.net. Both are then used in ...
3
votes
1answer
11k views

Multithreaded C# TCP Socket Server

I am trying to write a simple TCP server in C#. It needs to be able to receive packets and do work on them. Ideally it will only be receiving packets from a single computer, but I'm making it able to ...
3
votes
2answers
935 views

Cisco router configuration script generator in Java

I've written a basic program to generate a script that will automatically configure routing in a Cisco router. It reads an input file which contains the directly connected interfaces of a router. e....
6
votes
1answer
366 views

Flexible socket framework

I'm working on an async socket server, would really appreciate any critique and some advices regarding the place where i process received messages. My interfaces are as follows: IAsyncClient <...
1
vote
1answer
1k views

Multithreaded telnet chat server in Java

I have writed a multithreaded telnet chat application in Java. In main method I run telnet server. In server class at run method I bind in specified port (8189) and I spawn listener threads for every ...
2
votes
1answer
109 views

Caching strategy

I was making a simple currency converter utility and had to cache the conversion factors after fetching from server. Came up with the below interface. I have basically delegated the caching ...
6
votes
1answer
1k 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
2k 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 ...
1
vote
1answer
2k views

Forced and easy hton/ntoh conversion

Context: When sending message across the network, the sender has to convert the message from host byte order to network byte order and the receiver has to do the the reverse - network order to host ...
1
vote
1answer
4k views

IP Scanner via python sockets

Please review my code for scanning active IP address . Please Suggest improvements ... ...
2
votes
0answers
2k views

Folder sharing with python sockets

I am just getting started with python. I wanted to make a folder transfer tool to get familiar with python sockets. ...
7
votes
1answer
94 views

A simple PyPI crawler

I had to make a program to crawl through a bunch of PyPI packages and see how many of them implement custom compare operators (i.e. grep for def __le__ etc). After ...
23
votes
2answers
9k views

Simple and effective port checker in C++

Intro A couple of weeks ago I finished a Python implementation of a multithreaded port checker and I wasn't quite happy with the result I've got (speed). I needed it to be faster, so I've built ...
3
votes
0answers
86 views

Flexible port scanner library

I have tried to generalize the concept of turning an IP address into a boolean. The save format is an overly complicated way of storing consecutive IP addresses as strings of bits Example usage: <...
5
votes
3answers
1k views

Interface design to have multiple implementations of network call libraries (Retrofit or Volley)

I am learning design patterns from Head First Design Patterns and a principle I came across is to "code to interface". Now I want to apply this principle in my Android app, which includes lots of API ...
4
votes
1answer
10k views

C multithreaded chat client and server

I've written a TCP chat application for the command line that supports multithreading. I'm wondering whether I'm using best practices for socket programming, what other types of functionality would ...
0
votes
1answer
2k views

Winsock recv all bytes

I had some issues with sending huge data and receiving them with Winsock so I made some improvements on my RecvAllBytes function and the same with ...
6
votes
1answer
431 views

Server-client data transfer

I coded a server-client (kind of) chat, and I need your review as I'm sure it is a mess. I used lots of tutorials and tips form different websites and forums which were posted at different times (...
3
votes
0answers
216 views

Minimal Async Web Server in Rebol 2

I'm building a rudimentary web server in Rebol 2. I'm trying in particular to understand the flow and logic behind the asynchronous aspects of the TCP scheme. As far as I can understand it, you ...
6
votes
4answers
150 views

Nagios check to see if a certain IP appears in a trace route

I needed a test to know which firewall in out HA environment was currently active. We have a webFilter connected to our "primary" so if the firewall fails over the webfilter is taking out of path and ...
2
votes
0answers
4k views

Sending ACK/NACK for packets

The code is working perfectly. I'm little bit sure this is a packet what I am sending from client to server in streams. Is this packet? Am I sending in a right way? Another thing is that I am sending ...
2
votes
1answer
11k 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....
3
votes
0answers
183 views

Download website source through Socks4 using Winsock

I just have started to introduce myself into network programming using C++. So I started with Winsock. The code I made is compiled with MinGW and works perfectly! As a beginner, the main purpose of ...
5
votes
3answers
1k views

Simple wrapper for member function pointers with known signature

I always wanted to know how to pass member functions as arguments, and then I stumbled across templates that could automatically deduce types, and so I rejoiced! This is used in a Publisher-Subscriber ...
4
votes
1answer
374 views

Providing a simple test server for protocol testing

For an outsourced job (implementation of a network client) I will provide a simple server for protocol-testing. This is the code. Do you consider this code readable/ comprehensible? ...
3
votes
2answers
138 views

Python 'wrapper' around `dig` for easier TSIG signing of queries

I wrote this Python script as a utility script for me. It's something that could be achieved in a simple shell script or alias, but it wasn't 'verbose' enough for me in that format, or customizable. ...
2
votes
0answers
6k views

Blocking TCP Client with Threads vs. Non-Blocking TCP Client with Unitys Update

I'm not sure if this is the right subsite of stackexchange because it's not only about code review but a bit about design eihter. I'm currently developing a network application. I need to connect a (...
10
votes
2answers
9k views

Simple IRC Bot in C#

This was a simple IRC bot I threw together a long time ago, found recently, and was curious as to if there were any kind of significant improvements that could be made. ...
4
votes
0answers
4k views

Network Bandwidth Usage Monitor

I have written a very basic bandwidth usage monitor in C++/winpcap. I would like to get some feedback, regarding design choices, implementation, style, correctness. (Or anything else you care to ...
4
votes
1answer
3k views

Boost::Asio server

This is my first time trying to do anything proper in Boost::Asio, so I would love if someone could look at it and tell me if it makes sense. It's based on examples ...
5
votes
1answer
10k views

Python internet speed testing

I understand there are a few similar tools available for testing speed but that's not what I'm looking for. I'm looking at seeing how long it takes to request a site's HTML. However, I'm getting ...
3
votes
1answer
3k views

Base activity for handling network state changes in Android

I had the need in one of my activies to handle displaying a message to the user when the network disconnected, and then reload the data for a RecyclerView adapter ...
7
votes
1answer
191 views

Array view adaptor class for static polymorphism over network header parsing

Some context: I have some existing code to populate network header structs from istreams. A motivating excerpt: ...
4
votes
2answers
420 views

Bash script for setting up a LAN to WLAN router

I wrote a bash script for the Raspberry Pi 3 (Raspbian) which has the main task of setting up a LAN to WLAN router. In addition it makes some things nicer for the intended users who have Windows ...
3
votes
1answer
1k views

Client/Server, Asynchronous ping-pong exchange

I'm mainly wondering about whether or not I have used the (TAP) async/await pattern correctly. I get a bunch of these warnings, "Because this call is not awaited, execution of the current method ...
3
votes
1answer
2k views

Desktop sharing project

I've been developing a small screen sharing project for the last months, it's a desktop application, pct protocol based. I'm going to show the logic and the code and I hope to get reviews. I would ...
6
votes
2answers
5k views

Internet Speed Calculator

This program calculates up and downspeed of a given connection for as long as it is running. ...
2
votes
2answers
115 views

Network App - Reading, Writing, Synchronization

I'm writing a tiny networking library for learning purposes and personal use and I'm not sure if my approach to handling reading and writing exceptions and synchronization is correct. Feel free to ...
7
votes
1answer
312 views

Robust websocket server for use by a game running on node

This code is a server for websocket connections, it handles the low level stuff and delegates incoming messages to handler objects. I wanted performance to win in any trade off against maintenance ...
7
votes
1answer
179 views

TCPListener server to discover clients on a network

I am currently writing a program to sync files (music, photos, etc) from my PC to an Android device. In order to do this, I have 2 application: one that is running on my PC, and one that shall be ...
13
votes
3answers
5k views

Structure to ByteArray Extension

I have a need to turn various structures into byte arrays to be sent over serial port to another machine. I created generic extensions to turn any structure into a byte array and from a byte array ...
3
votes
1answer
939 views

C++ getaddrinfo()/addrinfo wrapper (rewrite)

As suggested by @Dannnno on my original post, I am posting my partially rewritten getaddrinfo() (and now addrinfo) wrapper for ...
7
votes
2answers
821 views

C++ getaddrinfo() wrapper

EDIT: New version can be found here: C++ getaddrinfo()/addrinfo wrapper (rewrite) I'm a C++ novice, but an experienced Python and C programmer. I decided to code a C++ wrapper around ...
2
votes
0answers
366 views

Comparing three packet routing algorithms via simulation in Java

Inspired by my question Simulating a random packet routing algorithm and printing packet statistics in Java I decided to implement two more packet routing algorithms: one that computes all the ...
4
votes
1answer
530 views

Buffer for TCP data

For an assignment (not school), I was supposed to make a "web browser" using Scapy. While storing the response, I initially thought of ...
3
votes
2answers
811 views

Simulating a random packet routing algorithm and printing packet statistics in Java

I have this short program for simulating a random packet routing algorithm: Packet.java ...

1 2
3
4 5
7