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.

Filter by
Sorted by
Tagged with
5
votes
1answer
68 views

Streaming Messages to multiple Clients

I wrote a server-client application in Python where the server sends a never-ending stream of messages to connecting clients. I was in need for such an architecture since I want to retrieve and ...
1
vote
1answer
77 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 ...
-1
votes
0answers
20 views

Which is better approach to attain performance? - Replaying one large pcap file or split into multiple files based on sessions

I have more than 1000 pcap files to test against False positive. However it is taking more than 2 hours to respond. Requested to improve the performance Can I merge all pcaps into a single pcap file ...
10
votes
3answers
2k views

C# TCP server/client class

Goal My goal is to create a TCP server/client class that can be universally reused in various private projects. It should work stable and does not need to be super fast, but rather light-weight to ...
2
votes
0answers
36 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
1answer
48 views

F# Simple message reader using TCP

I have a review request about this part of the code: ...
1
vote
1answer
56 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 ...
3
votes
1answer
137 views

A simple TCP command executer

In https://github.com/pc-magas/tcp_command as an attempt to learn C++ I made a simplistic TCP server in GNU/Linux that will receives simple "commands" in ASCII form. Each command ends with '\n' and a ...
5
votes
2answers
110 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 ...
2
votes
0answers
100 views

Socket chat room made with Tkinter Python

This is a real live chatroom that I have made with Tkinter I posted a question before about making a chatroom but the problem that I had with that one was that only one user could connect to the ...
-1
votes
1answer
74 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 ...
1
vote
0answers
35 views

Socket sending/receiving data

I am a beginner in Android and this is my first big project in it. I am trying to communicate with an STM Discovery board using an ESP01 module. Below is the client connection class ...
6
votes
2answers
616 views

Socket chat room in Python

This is a Python chat room that I've been working on and it enables to you to chat to other people on the same network through Python. Server.py: ...
3
votes
0answers
289 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 ...
8
votes
1answer
737 views

TCP client and server API

I made a server and client API for TCP connection. It is intended to shorten the work you need to do to prepare the server and client. It's separated into 3 projects - ...
5
votes
1answer
565 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 ...
1
vote
0answers
362 views

Flask app for control TCP server

This snippet allows to up and down TCP server via Flask endpoints. I'm seriously concerned about global variables here. And asking for review this code. The main idea is to be able to up/down TCP ...
1
vote
0answers
159 views

Transfering Image Data with QTCPSocket

In my program I am transferring image files continuously through QTCPSocket for each frame I am creating new connection which I believe causes the performance problems. But I couldn't transform my ...
3
votes
2answers
484 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: ...
1
vote
1answer
951 views

Multithreaded non-blocking tiny echo server

I wrote this code to make a non-blocking server without using select(), my main concern is to catch as many exceptions as possible for worst case scenarios (so I ...
2
votes
2answers
123 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 ...
4
votes
1answer
659 views

Multiple client TCP stream reader

My server code is currently reading String data over a TCP connection form 2 different client computers. To do this I am duplicating the ...
3
votes
2answers
142 views

Send and Receive upto 200KB over TCP/IP socket

Code reviewers, I have changed code whatever be suggested by code reviewer and I want you to give me some feedback on the basis of my new code. I have written TCP server client code to send data of ...
14
votes
1answer
3k views

Event Based TCP Library

A while ago, I wanted to make a multiplayer game, so I wrote some TCPClient and TCPListener code, and it worked, but it was ...
5
votes
2answers
344 views

Send and Receive more than 64KB over TCP/IP socket

I have written TCP server client code to send data of any size (1 byte - 64KB) in a loop. The client (A) sends data to the server (B). B then sends the same data back to A. A matches the sent data to ...
4
votes
1answer
91 views

Handling a single connection to a server or client

I'm writing an asynchronous TCP server and client for a game in C# and in particular getting sending right is a bit tricky because calling BeginSend() before ...
5
votes
1answer
5k 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: ...
2
votes
2answers
145 views

Checksum computation in x86_64

This is an implementation of the TCP/IP checksum computation as described in https://tools.ietf.org/html/rfc1071. The function is writen in DynASM, an assembler preprocessor that is part of LuaJIT. I ...
3
votes
1answer
5k views

File Transfer over TCP

I'm working on an Asynchronous TCP Client/Server using the old BeginXXX and EndXXXSocket API. The goal of this hobby project is ...
3
votes
1answer
3k views

golang concurrent tcp server

Go and concurrency noob here. I wrote a program to handle a tcp connection to index (and removes) packages. I want it to be able hundreds of connections and messages that might come in at the same ...
7
votes
2answers
9k views

Send messages in TCP-based communication system

I am working on a TCP-based Communication System. I wrote a working function for sending Textmessages and remotely opening a MessageBox. I would like to know how ...
4
votes
1answer
160 views

Checks for TCP-32764 exploit

I refactored this proof of concept for the TCP-32764 exploit. I'm writing a scanner based on this POC. The code works fine but It was really hard to read. Here is the original code ...
1
vote
0answers
78 views

Working with abstract classes and multiply servers with TX and RX interchange

I have different servers (TCP, Named Pipe, RS232, ...) in one program and I want that all the received data coming from one server are send to all the other servers (resp. clients of these servers) ...
1
vote
2answers
130 views

Encoding arbitrary data for stream transmission

Basically, what this function should do is encode an arbitrary set of data in memory to a series of bytes that starts with 0x02, ends with ...
13
votes
4answers
3k views

TCP client reconnection logic running on 30 machines

I am working on a service that is supposed to run on a large installation 24/7. Once the software is deployed, I will most likely not be able to make any changes anymore. This is my first time working ...
8
votes
2answers
27k views

C++ Linux TCP client/server socket wrapper

I am relatively new to socket programming, so I would like to ask if there is anything wrong with my code :) For the server socket I included the great new C++ lambdas, so you can start an ...
3
votes
1answer
7k 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 ...
6
votes
3answers
4k views

My first implementation of a client/server application

Well, it's 2 applications really. Each one does its own stuff on the front-end. It's the networking that I'm most concerned about. The Server starts listening for connections on the specified port as ...
3
votes
0answers
1k views

Read and Write TCP Streams

I am working on an in memory on disk cache and am using TCP to send data between the client and server Testing locally things seem to be working alright. I've written a small test client so I can ...
6
votes
2answers
7k views

Protocol implementation, TCP, sending images through sockets - follow-up

I would like to ask about your opinion about my code. The idea is simple: I designed my own protocol, where client asks server about the image, and the server sends the image, following the below ...
10
votes
1answer
3k views

Network protocol using TCP, sending images through sockets

I would like to ask about your opinion about my code. The idea is simple: I designed my own protocol, where client asks the server about the image, and the server sends the image, following the below ...
22
votes
2answers
4k views

Simple and effective port checker in C++

Intro A couple of weeks ago I finished a Python implementation of a multithreaded port checker and I wasn't quite happy with the result I've got (speed). I needed it to be faster, so I've built ...
4
votes
1answer
7k views

C multithreaded chat client and server

I've written a TCP chat application for the command line that supports multithreading. I'm wondering whether I'm using best practices for socket programming, what other types of functionality would ...
0
votes
1answer
2k views

Winsock recv all bytes

I had some issues with sending huge data and receiving them with Winsock so I made some improvements on my RecvAllBytes function and the same with ...
6
votes
1answer
371 views

Server-client data transfer

I coded a server-client (kind of) chat, and I need your review as I'm sure it is a mess. I used lots of tutorials and tips form different websites and forums which were posted at different times (...
2
votes
1answer
3k views

16-bit Checksum function in C

I was playing with TCP/IP, and came across this 16 bit checksum function: ...
11
votes
1answer
9k views

Asynchronous TCP server

After some investigation, I implemented an asynchronous TCP server as per the following example. During my investigation I was unable to find an example that cleanly shuts down the server; after some ...
2
votes
0answers
2k views

Sending ACK/NACK for packets

The code is working perfectly. I'm little bit sure this is a packet what I am sending from client to server in streams. Is this packet? Am I sending in a right way? Another thing is that I am sending ...
3
votes
0answers
158 views

Download website source through Socks4 using Winsock

I just have started to introduce myself into network programming using C++. So I started with Winsock. The code I made is compiled with MinGW and works perfectly! As a beginner, the main purpose of ...
2
votes
1answer
4k views

Simple TCP Listener class

This is my first winsock TCP listener ever written. I can use it for a small framework. tcp_listener.h: ...