Questions tagged [socket]

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.

45 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6
votes
0answers
126 views

Single-threaded fully asynchronous server, with a SocketSelector that dispatches events

I need a fully asynchronous single-threaded server written using .Net Core. Searched for options and, surprisingly, did't find any. So I decided to write a simple prototype. Borrowed idea from python'...
5
votes
0answers
71 views

Simple chat server in Python

I'm new to both Python and socket programming and figured setting up a simple chat server would be good practice. In addition to general critiques of the code, I have specific questions: What are the ...
5
votes
0answers
36k views

Python video streaming server and client

Worked with same IP cameras for some time, and noticed that camera use much processing power because of multiple connections. Writing streaming server looked as nice solution so I decided to write my ...
5
votes
0answers
610 views

A full-duplex connection to an IRC server

This connection class can be used, through composition, to make IRC clients for different kinds of IRC services. ...
4
votes
0answers
87 views

Chat using async Python and sockets

I am trying out websockets using the python async framework aiohttp. Basically I have created a game which will include multiple ...
4
votes
0answers
1k views

C++ network stream

So, I'm new to socket programming. I wanted to get started learning, and start making stuff, but was really surprised to find out there was no standard C++ network library yet. I'd have to look for a ...
4
votes
0answers
801 views

Boost Asio Listener

I have developed a piece code to listen on a socket using Boost::asio. I would like to use that code in production. But before that, I would like to test it and ...
3
votes
0answers
38 views

Application uniqueness and unilateral IPC on Unix

This program Detects application uniqueness, if the application is a unique/primary instance, it launches a server, otherwise a client over a Unix domain socket. Client will send a message that will ...
3
votes
0answers
50 views

one-thread blocking approach for socket tcp multi-client server

my use-case (an home task to practice abstraction, exception handling, unitests) is regarding a message-queue with small-fixed-size client requests from stdin of such: [ENQ] data (insert json ...
3
votes
0answers
621 views

TCP client reading socket asynchronously

I'm relatively new to .Net/UWP networking and have been trying to make sense of the APIs. I'd like to implement a TCP client that is capable of reading and sending messages independently (there is no ...
3
votes
0answers
3k views

Large file transmission over socket in Python

To learn network programming in Python, I have written a small piece of code which is constituted of 2 modules, a client and a server. The server listens to a specific port provided on command line, ...
3
votes
0answers
1k views

Asynchronous sockets with begin/end and a state machine loop

Disclaimer: I am a C++ guy, so my C# is not even close. Therefore some review might be helpful. Here is my 4th attempt at a client using asynchronous sockets. Please give feedback. The hardest part ...
3
votes
0answers
80 views

Live radio streamer

I've posted a repo on a live radio streamer much like shoutcast/icecast without admin panels / user panels or custom mounts. I was wondering if anyone could review it and tell me what I can do better ...
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 ...
3
votes
0answers
125 views

msysGit to Unix sockets

I wrote this small script to help porting msysGit sockets to WSL ("Bash for Windows"). I'm not a big Python programmer so any feedback would be well appreciated. By the way, I made it a public Gist ...
3
votes
0answers
503 views

Event-driven UDP listener wrapper

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

Log tailing socket server

Each client application would send a filepath and search term to the server. The server then takes that file path reads the file and returns any lines that contain the search term, the server then ...
2
votes
0answers
40 views

Rust HTTP Requester

I am writing an HTTP client for terminal, similar to curl, as a learning exercise. There's one limitation it suffers from and that is that it won't return until the client closes the socket. I fixed ...
2
votes
0answers
54 views

Simple Socket Server in C for Windows

I have taken the code from a tutorial of Microsoft webpage. Of course, the example is for illustration only but I wanted to organize it and make it clear in order to understand it a little more. Here ...
2
votes
0answers
165 views

Simple Go Linux daemon to send/receive gob-encoded data on a socket

I'm currently working on a linux daemon and would like some feedback. The program is a simple unix socket server that sends around gob encoded messages. I'm still getting the hang of concurrency in go ...
2
votes
0answers
108 views

Web server using syscalls in Go

I'm new to Go and wanted to implement a web server using system calls to get a better feel for how everything works. I'm looking for feedback on idiomatic go especially error handling and using ...
2
votes
0answers
229 views

Gomoku game with socket client(multithread) and server

I've write a gomoku terminal game with socket client and server. The main suggestions I am looking for: Am I using the multithread in right way? As when I tried to migrate the terminal game to GUI(...
2
votes
0answers
50 views

Write one string to a socket within 10 seconds or another string if the time is out

I have implemented a method which will send one data to the server if it (Raspberry Pi Pin Input HIGH, in this case) occurs within 10 seconds. If this doesn't happen within 10 seconds then I should ...
2
votes
0answers
1k views

Java Socket Proxy

I've been messing around with protocol handlers in Java, going so far as to write my own using a custom URLStreamHandler and ...
2
votes
0answers
253 views

Simple client/server library

I'm writing a Tamagotchi clone, and decided to try making an online version. Since I don't do a lot of networking projects, I decided to try and go off on a tangent and screw around with sockets and ...
2
votes
0answers
71 views

Small IRC library w/ message loop

So I felt like creating a small library to make IRC bots. It's separated in two classes. TelClient is a class that handles the low-level socket programming and ...
2
votes
0answers
37 views

Class which encapsulates related socket streams

I have a class which encapsulates stream related objects, and I have provided the method API for doing basic manipulation on the stream read/write/close, but is this a good approach? The only benefit ...
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 (...
2
votes
0answers
164 views

Android app that listens for commands over a socket

I've just begun programming Java and I'm working on the following code that deals with socket-based communications. Basically it connects to a client on port 8888: Gist of code ...
2
votes
0answers
70 views

N Processing connect to a single process: Socket Programming

The idea of my program is to use pthreads, semaphores, posix shared memory, and sockets to create an environment where N processes (that we will refer to as the children) can connect to a single ...
1
vote
0answers
35 views

Java local service with sockets

My goal was to create a Java service on Windows that runs locally and communicates with local programs using JSON. The service should be reliable and robust. The service runs a ServerSocket and ...
1
vote
0answers
52 views

Socket sending/receiving data

I am a beginner in Android and this is my first big project in it. I am trying to communicate with an STM Discovery board using an ESP01 module. Below is the client connection class ...
1
vote
0answers
35 views

Back-end web framework with sockets

I recently became interested in back end web frameworks in python, but I didn't want to use django or flask. (I want to make something similar to django or flask) So I decided to make my own. This is ...
1
vote
0answers
65 views

Managing multiple sockets in a network client in Python

I'm writing a small FIX client in Python (2.7, constraint I cannot waive for now, unfortunately). There will be multiple sockets, connecting to different ports, so I thought I'd create a ...
1
vote
0answers
99 views

Server Client in socket c

This is a lib I am doing to interact with sockets. :) Here is the main file: ...
1
vote
0answers
32 views

Asynchronously receiving data from a connected socket

Can anyone tell me if this is the right way to call BeginReceive asynchronously? The code works fine but I want to make sure. ...
1
vote
0answers
3k views

Async test client for TCP socket

I've made some modifications to the async client example found on MSDN for the purpose of testing a server application. It works entirely as I expect and/or want, even running multiple clients, but ...
1
vote
0answers
644 views

Socket server with consumer-producer design to handle concurrent connections

The usual way is to implement socket server to handle concurrent requests by creating new thread for each request. Instead of this approach i tried to create a server using ...
1
vote
0answers
1k views

Protocol to parse packets using TCP

I posted this question a year ago and until a weeks ago I solved most of the issues that were happening due to incomplete packets, things like trying to read the packet header again when the payload ...
1
vote
0answers
3k views

TCP Server using Winsock IO Completion ports model

I implemented a tcp socket server using the Microsoft IO Completion Port Model, which is basically an asynchronous model where WSAXXX function return immediately and you use a worker thread to handle ...
1
vote
0answers
2k views

Multithreaded client socket

This is my first time working with networks and multithreading in C, and would like to know how to make improvements. I wanted to make a client program that handles reading and writing to the server ...
1
vote
0answers
170 views

ByteBuffer Performance with Java NIO2 AsynchronousChannelGroup.withFixedThreadPool

I have a socket which will be receiving more than 100 TPS, so I need the reading to be as fast as possible. In this socket, I read the info I need to build a String and check if it matches a regex. I ...
1
vote
0answers
53 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: ...
1
vote
0answers
2k 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 ...
0
votes
0answers
10 views

What are the downsides of stateful socket NodeJS server comparing to a regular stateless REST server?

I've built this NodeJS server architecture 5 years ago. The project was in production all this time, I've been maintaining it actively, adding a lot of new features, and had no troubles with this ...