Questions tagged [tcp]
Transmission Control Protocol (TCP) is a transport layer protocol that provides a connection-oriented data stream service with guaranteed, in-order delivery.
168 questions
3
votes
1
answer
91
views
UDP and TCP sockets in the browser
I'm using a Web extension to communicate with an Isolated Web App over externally_connectable for the capability to use Direct Sockets UDP and TCP sockets from ...
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
130
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 ...
4
votes
2
answers
133
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 ...
2
votes
1
answer
270
views
to capture packets with options like -i interface, -o open file, etc using pyshark and python
review my code if possible. I am making network packet capture using pyshark and python. if possible give me some feedback about the code and help to make it better.
...
3
votes
2
answers
3k
views
TCP server in C++
I am building a TCP server in C++, and right now it's a test version without logic to handle server-client packet transactions. Please check if there are any memory leak related issues or anything ...
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 ...
1
vote
1
answer
185
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 ...
3
votes
1
answer
250
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:
...
1
vote
1
answer
381
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 ...
2
votes
0
answers
404
views
Delphi TIdTCPClient connection pool in a multithread environment
I want to use TIdTCPClient to connect to Redis from a web server application made with Delphi and TWebModule. Currently on ...
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 ...
4
votes
2
answers
2k
views
Simple TCP Client in C++
I've been experimenting with TCP clients in C++ and I really wanted to get some feedback on my code since I know it is bad. I would really appreciate some feedback on the class structure I have and ...
2
votes
0
answers
201
views
Code to send print jobs through Jetdirect port
I have a program made in Go that lets me send files directly to printers through the Jetdirect port. The program works without issue and I can print in any printer with the port 9100 enabled.
...
6
votes
1
answer
602
views
Read HTTP header from TCP socket
I'm growing a web server in Haskell that interfaces with TCP sockets using network. To read the HTTP header of the client's message, I use the following function:
...
3
votes
0
answers
195
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 ...
2
votes
1
answer
151
views
Async Tcpwriter and Reader
I currently have a class that I want to serialize/deserialize messages sent to this socket.
My plan was to use Task.WhenAny() to monitor 2 tasks (Either watch ...
6
votes
0
answers
3k
views
Implementing a TCP client in Golang
I am very new to concurrent programming in general and want to know if my implementation is thread-safe.
I'm currently working on implementing a TCP client in golang. The service listens on a port ...
1
vote
1
answer
1k
views
TCP server in Android to continuously listen to an RFID reader
I have created a TCP server thread which I want to keep running and listening to the IOT device (an RFID reader).
I have only one client.
Please review my code and provide your feedback. Are there ...
4
votes
2
answers
289
views
Tcp server messenger awaiter in f#
Hi I have a simple tcp server, and that server receives messages with specific length so basically i need to wait for TcpClient to fill buffer with that amount of data, and it works.
But I am not ...
-1
votes
1
answer
2k
views
C# Handling Task Cancellations/Timeouts and Exceptions [closed]
I am very new to Tasks and therefore new to handling task cancellations and task exceptions.
I wrote this method that gets a List which is then used to populate an ObsservableCollection shown in a ...
3
votes
0
answers
1k
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 ...
7
votes
1
answer
5k
views
Non-blocking TCP and UDP in Unity3D Game Engine
I would like constructive criticism of a networking plugin I've written for Unity 3D. The use-case of the code is for people in "creative coding," where simple TCP and UDP messages are used for ...
5
votes
2
answers
2k
views
Simple multithreaded chat server in Rust
I'm trying to develop a simple Rust chat server. I'm not a Rust expert and come from Java and Kotlin.
This same server in Kotlin is:
...
3
votes
2
answers
276
views
Read framed nested sensor data from memory stream
I'm implementing a TCP client to read data from a sensor. The sensor sends messages to connected clients framed with a start sequence, messages, checksum and end sum bytes. Because the sensor is ...