An endpoint of a bidirectional inter-process communication flow. This often refers to a process flow over a network connection, but by no means is limited to such.
0
votes
1answer
27 views
Listening for several connections in an async method
Is there a better way to structure a method that returns a task that queues several inbound socket connections?
...
1
vote
0answers
17 views
NodeJS socket for handling errors
It's the first time managing Mongoose by socket.io and I'm wondering if this could be a good way:
...
-2
votes
1answer
33 views
Multiplayer Tic Tac Toe with Socket.io [closed]
I am trying to learn Socket.io and develop a multiplayer tic tac toe game. Right now, I have developed a game that plays well when hosted locally, but I cannot seem to transmit game moves between the ...
1
vote
1answer
30 views
My Own ThreadPool implementation
I tried to make a Server using Java with a Thread Pool. Any review is welcome:
...
4
votes
1answer
27 views
3
votes
1answer
68 views
Adding new sockets and sessions
I am currently writing a TcpListener class where it begins a new socket and adds a new Session. I have classes called ...
3
votes
1answer
67 views
2 way communication Python socket
I'm trying to create a 2 way communication socket in python. The socket will listen for connections from the client until it gets the data formatted in string like this: 'PHONENUMBER|STATUS'. I will ...
4
votes
1answer
123 views
Creating a TCP Listener and receiving data
I am very new to network programming and I'm thinking I have probably misconstrued the creation of an appropriate TCP listener. The code I have below works perfectly, but I have a feeling it's a "hack ...
2
votes
1answer
60 views
HTTP client similar to cURL
I'm writing my own HTTP client, kinda like cURL. (I already know I'm reinventing the wheel, this is more or less getting an inside look of HTTP 1.x before 2 becomes a thing.)
So far pages download ...
1
vote
0answers
132 views
Server socket implementation with Python asyncio
I want a socket server implementation with the Python asyncio library. I have this code but I don't know if it's correct. I want to implement SSL, too.
I used code from the documentation example and ...
2
votes
1answer
40 views
Arranging this socket namespace
Finally I managed to work with socket.io namespace stuff which I'm using for building a chat module. Here employees of multiple organizations can join & make chat with other employees of the ...
7
votes
1answer
293 views
Custom TCP Java proxy socket load balancer
I'm working on implementing a custom TCP proxy server which acts like a load balancer. The proxy server will accept client requests and then forward them to available hosts.
I am concerned about the ...
4
votes
1answer
140 views
Web socket server which needs to query some API and to pass chunk per chunk of data to its socket clients every M seconds
Let's say that I want to query some API which will respond with array of random numbers:
[4, ..., 17, ..., 25]
To keep things simple enough, let's say that array has always 10 elements. For ...
1
vote
1answer
164 views
TCP Server with multithreading
I am working on a banking application. I want to create a multithreaded TCP Payment Card (iso8583) server that can handle passbook printing requests simultaneously. Multiple devices are connected to ...
3
votes
2answers
493 views
Multi threaded TCP server
I wrote this just for fun, to hone my exception handling skills. I want to know what I can do better in terms of exception handling (and otherwise) in the below code
Server
...
4
votes
1answer
78 views
Simple One Way IPC Implementation for pcntl_fork
It is a common task for me to need to run many nearly identical child processes. Not often but sometimes I need those child processes to communicate their results back to the parent process. I have ...
7
votes
6answers
725 views
Reading a line of text from a socket
I tend to write code, with very few comments, and few line breaks. I'm currently just a student at a University. I've had professors tell me one way or another to comment, but I have a hard time with ...
2
votes
1answer
470 views
Simple TCP Client Server application with receive side only
I wrote simple TCP Client Server application, I was wonder could you please review my code. I would be grateful for any hints and tips regarding to logic of app, coding style or naming convention.
...
7
votes
2answers
165 views
Sockets and networking for a multi-platform game
I'm in the process of adding network support for a little Mac & Windows game I'm writing. Today I've finished the basic sockets plus a few other network helpers and would appreciate having the ...
1
vote
1answer
100 views
Reading/writing null-terminated strings from socket
I need to handle C style ('\0' delimited) strings from/to a socket and came up with this as a first attempt:
...
3
votes
1answer
633 views
Primitive Python P2P Socket Chat
Here is my code for a Python script for a peer to peer chat system on a network using sockets. I know there are some things that could be changed so there would be less repetition in the code and ...
7
votes
1answer
74 views
Dictionary synonym lookup via networking
I have a small TCP service running on port 4444 which, given a word, will look up synonyms in a dictionary. Below is my Scala code for connecting to the socket, sending the lookup command and parsing ...
3
votes
1answer
80 views
Optimizing a Node.io server code for self-balancing robot
I am building a 3D printed self-balancing robot, and use the attached server script to control it. I coded using node.io, express and socket.io.
The system is working, but I would appreciate some ...
7
votes
2answers
256 views
Mimicing a TCP connection
I've recently started a new job and been drafted on to a project that's running late. My task was initially to add Bluetooth connectivity to a C# app, but at the request of a more senior colleague ...
2
votes
2answers
115 views
Mutual friends finder written in Python
I've written a server/client tool which can "check the Six degrees of separation theory" in Russian social network VK.com. Client sends task (which contains two VK IDs) and Server tries to find all ...
6
votes
1answer
801 views
How do I interrupt a ServerSocket#accept() and shut down a multi-threaded socket server?
I have got here a work-in-progress piece of code here that does multi threaded communication via sockets. I am using a poison pill to shut it down. It is a local port number. Is there a better way to ...
3
votes
1answer
122 views
Refactoring this producer consumer class to minimize what is exposed
I don't like the service class below, specifically, the way it exposes the internals of the producer. While it would be possible to combine all three classes into one producer-consumer, I would ...
6
votes
1answer
311 views
Simple chat console app
I wanted to practice using sockets and multithreading. This is simple code where I start a Server and connect to it via Client ...
2
votes
3answers
1k views
Adding a timeout to an UDP socket server
I use a thread to read from a UDP socket. Afterwards the string gets parsed.
In another thread I send to every connected client via this socket. I would like to keep latency and resources for running ...
6
votes
3answers
283 views
Read partial socket message
I've written some code that is suppose to read socket all the time and when needed return the partial data from it. I just want the response to send a command. It works, but this is a bit messy ...
0
votes
2answers
593 views
Python UDP-server and JSON parser script
I am a python beginner. I wrote a script which should run on a raspberry PI as an UDP server. It is reading and writing to a serial device and has to process and forward JSON strings too.
Because ...
2
votes
4answers
435 views
Silent Try_catch in high load socket server or not?
I'm working on a socket application that will listen to incoming messages from about 400 devices. They all send a message at least once per minute. Now I have a working program and it has been running ...
3
votes
1answer
268 views
Proxy using socket, doubts on multithreading and connection closing
I'm trying to make a simple proxy server in Python using the socket library, mostly to understand how it works. I'm a noob both at programming and networking, so please be nice if my questions are ...
5
votes
1answer
2k views
Socket HTTP post request
I am working on a socket HTTP post request. Here is one method that I come up with. It looks dirty and is in C instead of C++.
...
6
votes
1answer
1k views
Multi-threaded socket server high load
I'm trying to make a backend for QuizUp like application: user connects to a server, sends credentials and gets paired up with another user. After that server handles each pair, periodicaly sending ...
6
votes
2answers
178 views
Keeping track of byte count in a binary protocol handler
I am putting together a fairly simple server that listens for a connection then creates this thread - textbook Java code - then accepts data on that connection.
I am following a protocol that the ...
8
votes
2answers
1k 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
4answers
127 views
14
votes
1answer
331 views
First socket class
I want my socket class to be reviewed, including recommendations and optimizations.
Sokect.hpp
...
5
votes
2answers
236 views
Socket class for use in web server
I've created this socket class to use in my web server application. I have two classes: one for the socket and the other for the webserver.
...
6
votes
1answer
236 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 ...
7
votes
1answer
3k views
Multi-threaded server socket
I'm somewhat new to network programming. I have a server that uses Ubuntu, which needs to send data quickly to about 50 clients.
As of now, I have about 50 concurrent connections (of course), and it ...
6
votes
3answers
15k 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 ...
10
votes
3answers
279 views
Windows socket class
I need some advice to see if my simple Windows socket class is good enough to be used in a simple chat application.
...
3
votes
1answer
1k views
Run a TCP server listening for incoming messages
I've written the following code, but I need some review on design style. I want to develop a library/module and expose an API to client programs. How do I do that?
The code just runs a TCP server ...
4
votes
0answers
309 views
A polling wrapper for Python's socket library
Even though I am working with one socket, I have wrapped it with an object which allows .recv() method which accepts timeout, using Python's ...
21
votes
3answers
2k views
Java method - levels of abstraction
In his Clean Code book, Robert C. Martin states that functions should do only one thing and one should not mix different levels of abstraction. So I started wondering whether the code below meets ...
8
votes
1answer
220 views
HTTP Stream Part 2 A stream that opens an HTTP GET and then acts like a normal C++ istream
The review I asked for yesterday was for a header only library.
HTTP Stream A stream that opens an HTTP GET and then acts like a normal C++ istream
This has some limitations as it downloads all the ...
4
votes
1answer
401 views
Turning a Java console app into a server
I'm not familiar with Java at all, so I'd like to get some feedback on this piece of code.
I made it by looking at a few Hello World-esque Java server examples, so it may have drawbacks I'm not ...
4
votes
2answers
3k views
Python Port Scanner
This is only my third Python script. Be brutal with me. Any tips, tricks, best practices, or better usages would be great!
...