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.

Filter by
Sorted by
Tagged with
1 vote
0 answers
15 views

TCP socket management using multiprocessing

I wrote a Python code for a device that generates an hotspot and communicates with an app using a TCP socket. The communication is managed by a process that opens a socket and uses two threads to send ...
user avatar
  • 111
1 vote
0 answers
85 views

Asynchronous socket server implementation from raw sockets

I've rewritten my HTTP server several times over the past year, because I tend to encounter an issue midway through an implementation realizing I didn't abstract, decompose, or decouple certain ...
user avatar
2 votes
2 answers
60 views

Programming Challenge: Python 3 DNS query resolver using socket

This is a DNS query resolver written in Python 3 using socket, I wrote it entirely by myself, it supports 8 primary DNS query types: A, NS, CNAME, SOA, PTR, MX, TXT,...
user avatar
0 votes
1 answer
24 views

Python Socket Class transfer functions for any networking related program

This code is meant to send an object (any object) over a connection to a recieving program. I want to make sure that i haven't made any red flags. It seems to work fine, i've sent tuples with data (...
user avatar
2 votes
1 answer
83 views

Resilient & Stable TCP Server Polling

I am looking for feedback to perfect my code developed for WPF in terms of speed, stability and resiliency. My code is supposed to handle synchronous status polling as well as asynchronous Commands to ...
user avatar
1 vote
1 answer
42 views

simple code that tries to establish tcp handshake. Creating tun device | what ever ip packets message comes try sending valid response.checksum&TCP

So I am getting packets from TUN interface and after that processing the packet, and then try to send correct TCP handshake response message. It does handle sequence and ack sequence handling but That ...
user avatar
  • 145
2 votes
0 answers
43 views

Asynchronous TCP server refactor design & not working features

I'm working on an asynchronous TCP server which is supposed to be used for a chat. I want to get a review for the TCP server part because I'm struggling to find a good design to fulfill the following ...
user avatar
  • 401
0 votes
0 answers
27 views

IP socket object with string serialization

I frequently deal with IPv4 and IPv6 endpoints, especially as HTTP URLs. To have the destination address and port available but also be able to easily serialize the socket into URLs, I creates this ...
user avatar
2 votes
0 answers
88 views

A reuseable reconnecting TCP socket with Asio

I'm using (non-boost) Asio 1.18.1 and C++17. Forgive the boost tag, there wasn't a more specific one. I have a async_connect_with_retry composed asynchronous ...
user avatar
  • 153
0 votes
0 answers
45 views

One-way chat which encode messages, this is the server side

This is one of my first real projects in python. It's basically a one-way chat where the server sends away an encoded message. The logic of it is pretty simple and I know there is some unnecessary ...
user avatar
3 votes
1 answer
180 views

Learning Sockets in C# (.Net Framework), Suggested Improvements?

I'm just learning how to allow interconnected apps via Sockets, watched a tutorial last night and based on that this is what I've gotten: Server.cs Code: ...
user avatar
  • 177
1 vote
1 answer
132 views

Time-Sensitive Synchronized Transfer of Data Buffer in C# to Multiple Clients

This is a C# program that is a reference implementation, it will be used to make a C version after it is stable and bug free. The programs are supposed to simulate sensor data collection and ...
user avatar
  • 111
1 vote
2 answers
53 views

Low level tcp socket

Since I am a Unix newbie, I wanted to know if the code reflects the "unix" style and if there is something to add for it to be robust. P. S. I hope I am not overusing ...
user avatar
3 votes
1 answer
200 views

JSON packet transmitter

I'm not familiar with how data transmission works, but I gave my best shot trying to code a server and client-side JSON packet transmitter via Python. Essentially client.py generates random JSON ...
user avatar
  • 45
2 votes
1 answer
112 views

FizzBuzz JSON via Unix socket (Go)

At heart, this program is just the basic "FizzBuzz" program. However, the program was pushed further, by making it a client-server via Unix Socket: Server run, and listening on a socket. ...
user avatar
  • 23
1 vote
2 answers
71 views

Simple server to host simple website page with css

I have created a simple server that host html that has css. Please make sure if ur testing then change the paths relative to ur system in listhell.c in respond_main(..) function. The html file has to ...
user avatar
  • 145
1 vote
1 answer
58 views

Server hosting single page site using TCP sockets in C

I have written a simple server to host my page and CSS (CSS file is 22KB). Using sockets and TCP. Can any one please review it and give feedback on how can I make my server reliable using TCP and ...
user avatar
  • 145
0 votes
0 answers
16 views

Does using the multiple setTimeout decrease the performance of the nodejs app

Cancel the old timeout for the trip. Find the trip by Id validate it. Find the new driver not in old driver. If driver not found Try again Sent request to the new driver. Update the trip driver. Sent ...
user avatar
  • 31
3 votes
1 answer
90 views

TCP chat room in Python3

(Previous question) I've created a server file, that keeps waiting for clients. When someone connects to the server, he can send messages to the server, and from the server it is broadcasted to all ...
user avatar
  • 163
4 votes
1 answer
271 views

TCP chat room in Python 3

I've created a server file, that keeps waiting for clients. When someone connects to the server, he can send messages to the server, and from the server it is broadcasted to all clients. Can you ...
user avatar
  • 163
3 votes
1 answer
119 views

Pomodoro timer daemon in C for BSD systems

I wrote a Pomodoro timer daemon for BSD systems in C (may work on Linux with -lbsd). The server uses poll(2) and sockets to communicate with the client and to ...
user avatar
  • 854
2 votes
2 answers
263 views

Write deduplicated 9-digit numbers from concurrent clients to a log

Problem Statement: Write a server (“Application”) in Java that opens a socket and restricts input to at most 5 concurrent clients. Clients will connect to the Application and write any number of 9 ...
user avatar
1 vote
1 answer
39 views

Utilizing idle socket server to do meaningful thing (timeout after sleep on epoll_wait)

I write an app server that uses TCP socket on Linux. When there is no traffic (no data is sent by client, no client connect() or ...
user avatar
1 vote
1 answer
182 views

Java UDP port knocking authentication. Many clients at the same time

This is a student project of mine. I got 4/5 points but I suspect there's a lot of weird stuff in there. I never had a chance to hear my teacher's feedback about it and it bothers me so I figured ...
user avatar
4 votes
2 answers
329 views

C++ TcpServer class

I have a class Tcp_Server that implements a TCP server. This is the base class for the other types of servers available in my program. For example ...
user avatar
  • 135
3 votes
1 answer
534 views

Secure socket programming with OpenSSL and C

Background Lately, I found OpenSSL to be difficult to learn as a beginner, while it can be implemented inside beginner-friendly projects like socket programming. ...
user avatar
  • 155
3 votes
1 answer
319 views

How can I speed up the processing of the received channel socket

This currently runs with 1400+ sockets and manages data correctly and in the manner the application requires. I do have an issue with the HandleData method where ...
user avatar
  • 161
1 vote
1 answer
58 views

Implementing classes in Javascript

I'm building a simple chatApp. The UI has just 3 interaction areas: input, submit and previous messages button. But I'm not interested in reviewing the app architecture as much as the javascript ideas ...
user avatar
  • 217
4 votes
0 answers
102 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 ...
user avatar
1 vote
1 answer
200 views

Feedback on send/recv functions for non blocking sockets in client side HTTP library

I'm working with TCP sockets in C, specifically only for client side HTTP(S) requests, and would like to get some feedback on my send and recv code. You can make some assumptions regarding my code, as ...
user avatar
  • 197
2 votes
1 answer
756 views

Async tcp socket client: send multiple requests with one connection

I'm new to socket programming and c++. I have a the following method that sends an array to server and receives sum of the array, I tried to make it async. ...
user avatar
  • 23
4 votes
2 answers
2k views

C++ sockets: Sending structs for P2P communication

Two parties communicate over a network sending back and forth up to 100 messages. Each message sent is a response to the last received message and depends on it. This means that both parties have to ...
user avatar
9 votes
2 answers
206 views

A Server and Client Chatroom Using Sockets and Threading

I made a chatroom with a server and client python files, using Sockets and Threading as a project. I'm interested to acquire ...
user avatar
5 votes
1 answer
53 views

A Program that gets text from a client and puts it into a file on a server

I recently created a program that could get information from a client, a name and some text, and then put that into a text file. From there the user can get open the text file straight from the ...
user avatar
9 votes
3 answers
741 views

Parse string into a struct

I'm writing a C application for the Networking course at the University. Basically it's a UDP server that can receive two commands: GET key SET key value That are ...
user avatar
5 votes
1 answer
332 views

Server in Python

I'm looking for a code review and code improvement for my own small server. The server accepts the requests: User Join,User Leave,User Text Notify Group Join, Group Leave, Group Notify Request Time. ...
user avatar
  • 51
3 votes
1 answer
74 views

Finding the class to which the IP address belongs

I have tried the code for finding the class of the IP address the user inputs, and printing the network and the host bits in the IP address. Could someone please review this approach and provide ...
user avatar
  • 297
4 votes
0 answers
149 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 ...
user avatar
4 votes
1 answer
853 views

HTTPS proxy server in Rust using the CONNECT protocol

I'm a Rust newbie. As a pet project, I decided to implement a simple multi-threaded HTTPS proxy server in Rust which uses the CONNECT protocol. I have tested the code below using my browser. ...
user avatar
  • 143
3 votes
1 answer
84 views

Encrypted Online Rock Paper Scissors Game

I made an RPS Game with python with the Crypto and socket modules. I would like you to look at the code and tell me if anything ...
user avatar
2 votes
1 answer
32 views

Python Socket programming chat - getting a handle on PEP conventions

A while back I wrote a socket programmed chat in Python. This question isn't really about the program specifically, moreso on conventions of Python and my style of coding. I've only been using Python ...
user avatar
  • 445
0 votes
1 answer
109 views

A common class for Client and Server [closed]

I have written this code to use TcpClient both from a client program and a server program. Can you review this source code? Kindly, take a close look at ...
user avatar
1 vote
1 answer
414 views

Basic asio framework using epoll

I created an asio framework using epoll. Full project: https://github.com/arkceajin/EpollSocket.git I wanna know is there any potential issue. Below is the core ...
user avatar
  • 113
3 votes
2 answers
2k views

Adding a cancellation token to TcpListener.AcceptTcpClientAsync()

There is no facility in TcpListener (or for that matter Socket) to close a listening socket that is waiting for a connection without throwing an exception. After running up a test bench with 8 ...
user avatar
12 votes
3 answers
2k views

Correctly applying the "rule of five" to a RAII socket wrapper

I was trying to create a simple RAII wrapper with rule of 5 for a TCP POSIX socket. My aim was to try learn how to apply rule of five in different situations, but this one was somehow tricky. ...
user avatar
  • 285
2 votes
0 answers
40 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 ...
user avatar
3 votes
0 answers
41 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 ...
user avatar
3 votes
0 answers
63 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 ...
user avatar
  • 151
6 votes
0 answers
175 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'...
user avatar
  • 61
3 votes
1 answer
187 views

Java Networking Framework

So I've just written a framework that is supposed to make it easier to create a network-based application (client-server) using the native java.net package. I was wondering if the structure of my code ...
user avatar
  • 33

1
2 3 4 5
7