All Questions
Tagged with tcp multithreading
21 questions
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 ...
3
votes
1
answer
127
views
simple multi-threaded TCP chatroom in Java
I'm fairly new at coding and looking to improve. Down below is all of my files for a TCP chatroom with a GUI in java. This is my first networking project so I'm sure it has many problems and does not ...
0
votes
1
answer
242
views
Why is this not considered better way than Async Await
After so many searches and back-and-forth attempts, I have developed an TCP Server to listen to the network stream and it is working fine. So kindly review the code, and please let me know if this ...
4
votes
2
answers
121
views
C++ Neuron Spike Raster Deserializer
Please help me establish a solid foundation for this computational neuroscience project. I'd like to make sure I'm moving forward with something reasonable before I begin tackling the more complex ...
3
votes
2
answers
2k
views
Multithreaded tcp server accepting two clients with task factory and graceful shutdown
as an exercise from multithreading and networking I have decided to create my own implementation of TCP server accepting connections from two clients (which is I think a pretty common case e.g. chess ...
4
votes
1
answer
2k
views
TCP Multithreaded Server and Client C#
I created a TCP Server and Client and I really would like to know if its any good in regards of performance and code quality / safety. I hightlight the server and client class here. If you need more ...
6
votes
1
answer
21k
views
Simple TCP Send Receive with multithreading c#
Wondering how this sample program can be made better. Specifically what exceptions should I expect to handle? Right now it's working as expected. I put a breakpoint after the statement:
...
3
votes
1
answer
14k
views
Multithreaded C# TCP Socket Server
I am trying to write a simple TCP server in C#. It needs to be able to receive packets and do work on them. Ideally it will only be receiving packets from a single computer, but I'm making it able to ...
4
votes
0
answers
412
views
Linux performance using multi-threads (vs one thread) and ssh message
My server receives requests in one thread and responds in another. I am using thread pools of pthread-s for both receiving and sending. The performance is not that bad, however...
When I am doing the ...
1
vote
1
answer
969
views
Simplify TcpListener application in C#
I have a simple application that can receive and send tcp data.
right now there's a thread used to start the listener and within this thread there's another thread to receive.
it works but it seems ...
3
votes
1
answer
6k
views
Simple multi-client echo server
I've been looking at some async comms in C#. As a proof of concept, I've written a simple multi-client echo server. The server allows multiple TCP clients to connect and listens for input from the ...
4
votes
1
answer
877
views
Java NIO server Selector loop
I have a server that uses Java NIO in non-blocking mode. Right now I'm using a single thread for the selector, and four worker threads to process the bytes after ...
5
votes
2
answers
3k
views
MultiThreaded TCP Server with high CPU usage
I wrote simple C# TCP Server application and my program use a lot of cup, i was wondering anyone can review my code and would be grateful for any hints and suggestion.
This is my code.
...
1
vote
0
answers
2k
views
4
votes
2
answers
7k
views
Asynchronously accepting multiple client connections without impacting main thread
I am implementing a multi-player game in C# and having seen all sorts of projects, from indie developers all the way to large studios struggle to patch networking into existing products in the past, ...