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
43 views
TCP async client with connection lost detection and autoreconnecting [migrated]
Here is my many-years many times modified code for TCP asynchronous client.
It is able to detect connection loss (thanks to using keep alive values).
But now, I need to reconnect it to server ...
3
votes
0answers
50 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
0answers
99 views
Protocol implementation, TCP, sending images through sockets (sockets, python)
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 ...
9
votes
1answer
71 views
Implementing my own network protocol using TCP, sending images through sockets (sockets, python)
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 ...
19
votes
2answers
1k 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 ...
5
votes
1answer
100 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
57 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
98 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
93 views
16-bit Checksum function in C
I was playing with TCP/IP, and came across this 16 bit checksum function:
...
5
votes
1answer
495 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 ...
1
vote
0answers
120 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
38 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
161 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
58 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
40 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
227 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
103 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
41 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
197 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 ...
3
votes
0answers
56 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 ...
0
votes
0answers
331 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
107 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:
...
4
votes
1answer
157 views
TCP chat room in Python
I have recently started looking into networking with Python. I saw some tutorials about the socket library so I decided to give a "live chat room" idea a go. It works (on Windows, ...
7
votes
1answer
664 views
Async TCP client/server
I'm working on a simple async TCP client server application, i'd like my network code to be reviewed. I really feel that I'm doing something wrong, especially in receiving code.
Interface for client:
...
8
votes
1answer
94 views
TCPListener server to discover clients on a network
I am currently writing a program to sync files (music, photos, etc) from my PC to an Android device. In order to do this, I have 2 application: one that is running on my PC, and one that shall be ...
2
votes
0answers
246 views
Simple TCP proxy
EDIT
The previous proxy code, after thorough testing, had issues with the stream_copy_to_stream() when sending from $client ...
4
votes
1answer
80 views
Buffer for TCP data
For an assignment (not school), I was supposed to make a "web browser" using Scapy.
While storing the response, I initially thought of
...
5
votes
1answer
287 views
Simple Go TCP server and client
I'm a Go (and programming in general) newbie and the task was to program a Go server that would accept incoming messages, take each line, reverse its order and case and send it back. Besides doing ...
2
votes
0answers
56 views
Simple web server in Flash
I just got into Node.JS and am loving it but I am wondering if I am learning it the right way or using it. This is basically a simple server in Flash but I want to see if am doing it right with ...
2
votes
1answer
353 views
PHP TCP socket server
I created a PHP script which will be running 24/7 as a TCP socket server and will send data from the DB back to clients. The code is working, and so far, I see no problems.
However, I can only test ...
1
vote
1answer
305 views
TCP client library using Winsock WSAEventSelect in C++ - Take 2
This is my second take on creating a tcp client C++ class. The class declaration is general but the implementation is Windows only at this stage and uses the Microsoft Winsock WSAEventSelect model.
...
3
votes
1answer
283 views
TCP server implementation in .NET
I wrote a couple programs in the past that use VB6's Winsock to achieve TCP communications, but still I'm kinda new to socket programming in .NET.
I needed the same functionality of the Winsock to ...
6
votes
1answer
2k views
TCP authentication server and client
This is the first time I'm dealing with C# as I'm accustomed to Java sockets, so I do want your full review and anything you think I can accomplish better or optimize in the code will be very ...
3
votes
1answer
74 views
A socket server that receives strings and prints them
Summary: Is my server handling every error and corner case possible? If not, what did I miss?
Details
I'm trying to write the most basic socket server I can, so I can learn TCP and the pitfalls of ...
4
votes
0answers
640 views
Socket application using TPL
This is an application I wrote that allows multiple TCP clients to share a single TCP connection to a remote server (hosted project, and a demo). Traffic generated by the server is forwarded to all ...
5
votes
1answer
137 views
Server connection handler in Python
I am working on a server for a smart house. This part of code is responsible for communication with client (separate application), sending requested data and ensuring everything is safe.
I've decided ...
4
votes
2answers
206 views
Python 3 NetScanner Daemon
I’m pretty new to programming and python in particular. This is a simple ICMP/TCP scanner that dumps output to a terminal and/or csv file. My goal was to make a daemon that could do simple scanning ...
2
votes
1answer
302 views
Modbus connection over TCP and Serial port
I want to improve my code. In this code I don't like my constructor, but without it I keep getting an error while trying to connect NullPointerException.
...
3
votes
2answers
185 views
TCP client and server supporting six simple commands
For a class, I was given an assignment to code a simple TCP connection between a server and a client. Once the TCP handshake is done, the client sends inquiries to the server. It's a 2 second ...
4
votes
1answer
112 views
Common client server implementation
I have created a common C file for a basic client server. It works fine on my Linux setup. Please provide your comments/suggestions on how the code can be optimized/enhanced.
After compiling we need ...
4
votes
1answer
180 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 ...
3
votes
2answers
415 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
0answers
465 views
3
votes
0answers
96 views
Basic Server/Client Model built around ASIO
For this project, I'm using the non-Boost version of the ASIO library.
The basic idea is that it is a relatively simple stand-alone class capable of functioning either as a server or client depending ...
0
votes
0answers
60 views
Adds digital signature to outgoing TCP packet
The code connects multiple clients to a server using TCP sockets asynchronously. I have added code to attach a digital signature to the outgoing messages from the server, to authenticate the message ...
3
votes
1answer
189 views
TCP connection pool
I am looking for any feedback on my connection pool implementation (I removed the documentation so this post isn't so bloated). The pool times-out idle connections after a certain timeout interval ...
2
votes
1answer
2k views
Reading and Writing Messages from a Socket
This is code from my android client which communicates over wifi to a small server program (not coded in java). This is my first time playing around with sockets, so I'm sure there are lots of little ...
2
votes
1answer
117 views
Probe for open application on a TCP port
I need to examine an application port to see if it opens and I need to put the retry count as a parameter. Since I'm new to Node I wanted to get your feedback on it
for improvements.
...
2
votes
2answers
555 views
Simple TCP client-server solution
I have implemented a simple client-server solution using Java sockets and useful classes from java.util.concurrent.
The communication protocol is rather simple:
...
5
votes
2answers
1k views
Design watchdog, reconnecting to server
I have console application that sends and process XML data. I have created a fault mechanism that the connection drops. I go in a "fault" mode. And try to reconnect to my server. I'm sending ...