Questions tagged [socket]
For code which uses the Berkley Sockets API (specified by POSIX, and available on Windows too) to communicate with other processes using a network protocol.
327 questions
11
votes
4
answers
1k
views
A simple server-client application in C
I am reading "The Linux Programming Interface" by Michael Kerrisk. I'm studying about sockets, and I made a simple application using sockets on the unix domain.
I want to know if I'm using ...
10
votes
2
answers
1k
views
Multithreaded UDP server that advertises itself in a PostgreSQL database and launches other servers in response to messages from a client
Description
For fun, and to learn some C++, I've decided to reimplement the entirety of EVE online as I remember it. (I'm aware this is an insane and likely unreachable goal, that's intentional).
I'...
2
votes
1
answer
107
views
Optimizing C System Design for Sensor Data Handling
I am developing a system in C for a device running Yocto Linux (Posix compatible, libc, etc.) on a microprocessor. The Yocto build is "quite generalized", as it's supposed to run several ...
8
votes
2
answers
1k
views
A TCP server which uses one thread to read while writing data with another thread
The TCP server in the code snippet below is designed to:
Read data using one thread while writing data with another thread.
Allow only one client to be connected at a time.
Automatically close the ...
7
votes
3
answers
2k
views
Simple TCP port scanner
I’ve done port scanner program. It works well and accurate, but there is a problem.
It’s SUPER slow. That’s how it looks:
...
4
votes
1
answer
152
views
Writing a HTTP server in C
Code
...
8
votes
3
answers
737
views
Send arbitrary number of arbitrary length buffers in packets of fixed arbitrary size
Background:
I am in earlier stages of implementing a standard on top of an existing 'backend'
This standard requires that I send data in UDP packets of a size specified at runtime
All packets must be ...
0
votes
1
answer
159
views
Handling multiple socket communication in Python Client-Server application [closed]
I'm developing a client-server game application in Python. Here's the scenario:
Clients connect to the server and register.
After registration, all clients see a main menu.
One client can initiate a ...
1
vote
2
answers
1k
views
Multi-Client Socket Communication with Thread Pool in C++
I've been working on implementing a multi-client socket communication system with a thread pool in C++. The system comprises three main components: logger.h, socket.h, and thread.h, which handle ...
3
votes
0
answers
223
views
Simple Network Time Server in C++ with improvements from prior code analysis
From code review: OO simple network time server with changes from a previous code inspection and added Windows support
I made many changes as per the review comments. The code has been significantly ...
3
votes
1
answer
156
views
Winsock code for lockstep RTS game
Summary
This is my core networking code for the lockstep RTS game that I am creating. Clients connect to a relay server via a TCP socket, and any packets sent to the relay server are forwarded to all ...
5
votes
1
answer
517
views
OO simple network time server with changes from a previous code inspection and added Windows support
I put up my SNTP Server code for review here:
SNTPv4 server based on rfc 4330 in C++
a fortnight ago and since then I have made changes as per code review comments and also added support for Windows, ...
6
votes
1
answer
220
views
SNTPv4 server based on rfc 4330 in C++
Please review my SNTPv4 server based on rfc 4330
I tested running 3 instances of ntp-check.exe from Galleon systems and 1 instance of Microsoft w32tm - w32tm /stripchart /computer:
No crash!
This is a ...
10
votes
5
answers
979
views
Follow Up: struct sockaddr storage initialization by network format-string
This is a follow up to: struct sockaddr_storage initialization by network format string
First of all thanks to @Haris, @Toby Speight, @G. Sliepen and @chux - Reinstate for their help. I learned a lot ...
8
votes
3
answers
1k
views
struct sockaddr_storage initialization by network format string
I am writing a wrapper library for network functionality in C and wanted to let the user let the user initialize a struct sockaddr_storage with a format string.
Format ist like: "proto:host:port/...