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

learn more… | top users | synonyms (1)

-1
votes
1answer
42 views

Multithreading - program with lots of parallel routines (C++) [closed]

I'm coding a networking software, which has lots of functions (modules) which can be run in parallel. They share some resouces, like libnet_contexts of every type, ...
6
votes
1answer
148 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 ...
3
votes
1answer
67 views

Writing a new Finagle protocol

The following is a fairly naive implementation of a Finagle protocol that uses the scodec library for binary encoding and decoding. I'll assume something like the following SBT setup: ...
3
votes
2answers
41 views

Simple IPv4 and port validation for chat client

This is part of my chat client's code. It works fine but it looks messy. Any ideas? ...
10
votes
3answers
352 views

Parsing ARP cache in C

How can I make this better? ...
1
vote
0answers
28 views

“Transparently” converting the output to an e-mail message?

I recently wanted to write a regression testing script that produces a report that looks like this: ...
2
votes
0answers
79 views

Netty-based safely network reconnection

I am writing a TCP client app using netty NettyConnectionManager.scala: ...
5
votes
3answers
116 views

Confusing control flow

Currently, the following code runs and produces the expected and desired output. However, I'm sure that there's much wrong with it. This project queries the (flat) database, instantiates each row as ...
6
votes
1answer
96 views

Wait for messages in IMAP Gmail mailbox

I used the idle command to wait for incoming messages in my Gmail mailbox. The protocol I am using is IMAP. My concern is as follows: While the below code works, Gmail has a tendency to try to ...
4
votes
0answers
63 views

Decoding custom packets with Python using Twisted

This server require fast decoding of packets from clients, as I am expecting 5000 concurrent clients that is sending packets possibly every second. This is a game server (5000 players walking send ...
15
votes
3answers
1k views

Converting an IP

I've written a DNS tool in Node and would like to know if there's a better and more efficient way of handling the conversion from an IP to a long. I'm not too good at bitwise just yet and would like ...
10
votes
3answers
107 views

Dynamic library to intercept oddsock hostname lookups

Just for the fun of it, I decided I would try to create sort of an intermediate DNS system for the oddsock SOCKS proxy. With this, the domain name extension .unet is statically resolved when ...
8
votes
1answer
562 views

UDP Network server/client for gaming using boost.asio

I've designed those classes for use in a multiplayer game with possibly very high number of clients for one server. Is this implementation good, or is there something obvious I overlooked or something ...
1
vote
1answer
739 views

App for making calls to web services - AFNetworking 2.0

I've built a base class that I use a lot in my iOS app to make calls to web services. I built the base class to make the actual call and this base class is only ever used by another class. The idea ...
6
votes
4answers
152 views

Writing an interface for networking in an embedded system

I'm writing a driver in C for a WiFi module attached to a PIC18 microcontroller. I want to implement some functions that I'm familiar with in computer application level programming like Window's API ...
2
votes
0answers
128 views

Script for obtaining images from an IP security camera

I am fairly new to Python and programming in general so I hope the code in this post is not too messy. I have the following code which I use for taking images from an IP security camera: ...
6
votes
2answers
293 views

Echo server with CompletableFuture

I recently wrote a simple echo server in Java 7 using the NIO APIs so it was asynchronous and non-blocking. Then I decided, as a learning experience, to redo it with Java 8 hoping to use a more ...
7
votes
2answers
182 views

Python Port Scanner 2.1

I made lots of changes to the script presented in my previous question. I was tempted to edit that one with the new code, but it would invalidate @200_success's helpful answer. It was also ...
3
votes
1answer
101 views

Python Port Scanner 2.0

A few months ago I put up a port scanner for review. Now, I've updated it with some new Python knowledge and integraing the feedback I got. Some things I specifically think might be wrong with it or ...
5
votes
3answers
148 views

Latency problem for keyboard remoting from Android phone - follow up

I'm writing a simple remote PC app (mouse-keyboard). Android is the client and is connected with WiFi to Java PC Server. I'm using TCP but I see a bit of latency compared to other remote apps. I'm ...
6
votes
1answer
57 views

Handling packets and peers in a reliable UDP library

I am refining my reliable UDP library, its at its 3rd iteration now. It is quiet a bit multi-threaded with almost all major operations having dedicated threads. I need your opinion on the following ...
6
votes
1answer
218 views

Checking web-page repeatedly

I have a program that gets 5 random dice throws from random.org over and over. In order to avoid doing getaddrinfo() over and over with the exact same data, I moved ...
0
votes
1answer
74 views

Threadsafe network message

I have started making a very basic networking library in C++. It is built on UDP, with both reliable and unreliable delivery options. So far, I have made the base messaging class, so I will show the ...
5
votes
3answers
3k views

Client/server implementation in C (sending data/files)

I wrote this code to send any binary file from server to client (in our example, I am sending sample_file.txt); the client should recreate the file locally. Code works fine (I tested with one or two ...
5
votes
2answers
288 views

Producer/Consumer implementation

I am using Netty embedded within Grails to process and display incoming SNMP messages. Since Netty 4 doesn't come with a built-in ChannelExecutionHandler I had to ...
3
votes
0answers
204 views

Minecraft query tools

This is my first major PHP project and I haven't gotten much feedback and any feedback is appreciated! The quick rundown of the project is I wanted to learn how to use PHP and I wanted to learn about ...
5
votes
3answers
2k views

Client Sends XML, Server Parses XML, Queues Up and Executes Commands

I recently had a Java interview where I was asked to write a client-server application. I don't code primarily in Java, but with my preliminary Java knowledge, I thought I built a reasonable working ...
6
votes
3answers
694 views

How can I improve the performance of this concurrent http request loop?

I'm using the rolling curl library to fire http requests for content-length headers of images (we need to know their size to weed out placeholders and low res images). The image urls are stored in a ...
1
vote
0answers
264 views

Python urllib proxy access function - Coverage of possible proxy scenarios

Several of my Python 2.7 programs need to access server tasks via our server apache instance. The 'client' programs will run on Windows in various environments. They may be run on systems that do not ...
2
votes
1answer
54 views

Optimizing an IP generation method

I have designed a proxy server which has the feature to manage miniature separate networks. Each network has space to have up to 500 nodes or 500 IPs. The code for getting a new virtual IP is based on ...
5
votes
1answer
172 views

A simple NAT library

I've created a simple NAT library, with four essential functions: Find the UNPN device (the router in my case). Get the external IP address. Add a port forwarding entry. Delete a port forwarding ...
-2
votes
1answer
330 views

TV guide program and client server with sockets

I am fairly new to Python coding, although I have been coding on and off for 30ish years. I am sure I am writing Python with too much influence from the other languages, such as REXX, VB, and some ...
2
votes
1answer
216 views

Bash script to set up an ad hoc wireless network

This script creates an adhoc network using hostapd. I have tested it and seems to work reliably. I am new to linux networking and not sure if this is a recommended way to create an adhoc network this ...
4
votes
2answers
1k views

Asynchronous networking iOS API calls

I have the code above in my iOS SDK that I am building that makes it easy for users of the SDK to make API calls. Basically, users can specify an API endpoint and easily make API calls. Is there any ...
2
votes
1answer
325 views

Find the single smallest IP network with the given IP addresses

I have a bunch of IP addresses. I want one IP network that has them all. ipaddr.collapse_address_list already exists, but that gives you a list of all the IP ...
3
votes
1answer
405 views

Object-oriented Linux networking library

I needed to perform network communications in my Linux C++ project. I thought that it was a good idea to operate on a higher level of abstraction than raw system calls. Also I love OO design. So I'm ...
2
votes
1answer
744 views

QNetworkReply network reply timeout helper

Since Qt still does not support to set timeouts on QNetworkRequest objects, I wrote this little wrapper class: ...
3
votes
1answer
394 views

Basic network utilisation display

I've got the following code to monitor the network usage on a network interface. I'm mainly looking for feedback on the design, but if you see any code improvements please let me know! This is also ...
1
vote
1answer
4k views

Receiving data from a network stream in c#

So was my first attempt at some network programming. I basically have a couple clients built with c#, using System.Net.Sockets TCP connections connecting to a node server backend (first project in ...
2
votes
2answers
273 views

How is this for a “Hello World” of socket programming?

I was trying out the Beej's guide to socket Programming and wrote this. Is there anything that I am obviously doing wrong? Any potential for buffer overflows? Segmentation faults? Any possible errors ...
3
votes
1answer
273 views

Simple IPSec/tunnel setup script

I've developed a script to set up an encrypted tunnel between two Linux hosts, using iproute2, ssh and ...
3
votes
1answer
414 views

lightweight packet sniffer review

This is a simple packet sniffer that turns on LEDs when there's network activity. It works by picking up filters in a configuration file and listen for activity in those filters. When there's a ...
5
votes
2answers
612 views

Better way to code download speed calcuation

I'm writing a program that downloads stuff from the internet. While the program is working fine, I want to get one critical part reviewed. I use System.Diagnostics.StopWatch object to measure the time ...
3
votes
1answer
112 views

Communication with GARMIN through WEB

I am developing a WEB based GPS system and one of its functionalities is to be able to send messages and routes to GARMIN devices. I have never been using sockets before, and for some (obvious) ...
1
vote
0answers
100 views

Haskell network connection graceful handler

Just trying to work out some simple graceful connection handling code in Haskell to get my head around some of the IO/Networking/Threading stuff, some tips where I'm doing things poorly would be ...
2
votes
1answer
1k views

Get metadata from an Icecast radio stream

I am new to Python and not very familiar with advanced Python data structures. I have written a function to receive data from a socket in Python and perform string manipulations on it. The basic ...
4
votes
1answer
5k views

C# Async Socket Server with Events

I have written the following code, I am quite new to C# and Sockets, so perhaps I have made some big mistakes that only more experienced eyes can detect. This is to be used in a Windows Mobile 6.1 ...
10
votes
2answers
29k views

Implementing a good TCP Socket Server

I'd like a code review on my very simple server application that validates whether the serial number retrieved from the client is a valid one or not. Is there a better way to handle the start/stop ...
5
votes
1answer
1k views

Simple Socket class hierarchy

One of the things I wanted to do was make it impossible to forget to initialise or forget to cleanup WSA. Often the network examples will return as soon as an error occurs (say an socket didn't bind) ...
1
vote
2answers
194 views

Style and Best Practices for C99 Packetization Functions

I just spent some time putting together a simple protocol and implementation for packetizing byte streams (on GitHub here). The project is aimed at embedded systems that need a very lightweight way to ...