Questions tagged [networking]
Networking is associated with creating and managing networks as well as adding network connectivity to a (set of) programs.
356 questions
2
votes
0
answers
75
views
Basic Rust server + client to handle future game logic
I made a really basic server and client in Rust using tokio for the server.
I would like to receive feedback on the (very limited) code I have so far, just to make sure I'm on track to follow Rust's ...
1
vote
1
answer
114
views
Creating functions that send and receive atomic messages in Rust paradigm
I'm converting a library from C to Rust, and I want to see if this is the optimal way to implement network communication. This ...
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 ...
1
vote
1
answer
97
views
Asynchronous OOP-based networking using the Epic EOS SDK
There is also a limitation from the Epic EOS SDK in the absence of thread safety, all "C" calls can only be made from one thread. And from the thread where the SDK was initialized.
Based on ...
2
votes
1
answer
131
views
Lazy/deferred OOP-based networking using the Epic EOS SDK
For gaming applications, networking looks strange from the point of view of traditional approaches.
Much of the game logic is based on "ticks"; Most often this is a mandatory item of ...
1
vote
2
answers
661
views
Split netmask or ip address
I've written a python function to split a netmask or an ip address. The code is about to become part of a custom router api.
...
0
votes
1
answer
154
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 ...
2
votes
1
answer
130
views
sendmsg() scatter-gather coroutine awaiter, optimized suspending
My attempt at an Awaiter for sending scatter-gather data over an open file descriptor. Tested only on gcc-13.1.1
Micro-optimizing by suspending the coroutine only ...
3
votes
1
answer
95
views
Access integer field in network packet
I see three complexities in accessing (reading/writing) integer field in network packet.
Handle endianness. Integer in network packet is big-endian (BE). The host may be either big-endian or little-...
5
votes
1
answer
733
views
Python script that identifies the country code of a given IP address
This is a Python script I wrote to identify the country code of a given IP address, using data obtained from tor.
It uses geoip.txt to identify country code for IPv4 addresses, and geoip6.txt to do so ...
5
votes
3
answers
290
views
Socks4 Client/Server implementation
I implemented a basic Socks4 client and server which can handle CONNECT requests only right now also without identfication protocol support.
I've tested it with a ...
4
votes
1
answer
752
views
Python script to check network speed
This is a Python script I wrote to check internet download speed and upload speed.
I wrote this because I live in China behind the GFW, and I use VPNs to browse international free internet, and my ISP ...
10
votes
5
answers
958
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/...
3
votes
3
answers
175
views
Follow up: A chat server using the select() API
This is a follow up to my last question:
Multiperson chat server using the select() API
Changes:
After much fine critique, I made the following changes to the code:
Removed redundant casts and ...