Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

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.

2
votes
0answers
45 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
55 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
27 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
1answer
128 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
87 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
591 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
197 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
144 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
52 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 ...
2
votes
2answers
248 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
449 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
118 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
448 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
122 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
2k 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
325 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
87 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 ...
4
votes
1answer
3k 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
2answers
124 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
3k 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
2k 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 ...
5
votes
2answers
7k 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
154 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
125 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
2k 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 ...
6
votes
2answers
22k 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
6k 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
969 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
6k 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
2k 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
3k 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
6k 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
1k 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
354 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
2k views

16-bit Checksum function in C

I was playing with TCP/IP, and came across this 16 bit checksum function: ...
11
votes
1answer
8k 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 ...
4
votes
0answers
141 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 ...
3
votes
1answer
3k 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: ...
3
votes
0answers
195 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
1answer
407 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 ...
2
votes
1answer
3k 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 ...
1
vote
1answer
771 views

Simple TCP server using TPL

I have a working C# code of a TCP server that runs inside a windows service. It accepts incoming connections and starts sending/receiving data based on some complex rules. The top-level class for ...
0
votes
1answer
241 views

Async TCP connection that handles reading and writing

My situation is as such: I must connect to a server via TCP, at the end of the session (several hours), they will close the connection - throwing an exception that should be gracefully handled I need ...
4
votes
1answer
761 views

Node js server that create, read, and update user data using TCP socket and AES encryption

I've written a Node js server that create, read, and update user data from a SQL server hosted in Azure. Clients connect to the server using a standard TCP socket, every message sent or received will ...
2
votes
0answers
346 views

Custom TCP protocol concurrent chat server

So the task was to first create a custom TCP protocol (namely ebl0) with certain parameters in its header and a number of methods to use with it (e.g. Login, Create, Join etc.). I'm not listing it ...
1
vote
0answers
2k views

TCP Server using Winsock IO Completion ports model

I implemented a tcp socket server using the Microsoft IO Completion Port Model, which is basically an asynchronous model where WSAXXX function return immediately and you use a worker thread to handle ...
2
votes
1answer
702 views

TCP server with tasks

I'm writing a TCP server using tasks and I wanted to know if there's something I can improve and how I am doing. ConnectionHandler.cs: ...