Transmission Control Protocol (TCP) is a transport layer protocol that provides a connection-oriented data stream service with guaranteed, in-order delivery.

learn more… | top users | synonyms

9
votes
0answers
46 views

TCP Socket Wrapper

I'm trying to build a simple server software for training purpose, most likely a IRC server, but I'm not there yet. I'm currently implementing a TCP socket class, to ease the use of the C socket API. ...
15
votes
1answer
771 views

Simple webserver in C

My first learning project in C. Looking for general feedback e.g. gotchas, coding standards, formatting, naming etc. I'm here to learn! webserver.h ...
7
votes
2answers
214 views

TCP Tunnel in C

I'm completely aware that I'm not using NIO, but this is my first polished C project. All criticism is welcome, if I'm doing something wrong, I want to nip it in the bud before I'm used to it. ...
0
votes
0answers
47 views

Thread function for server-client connection

edit: This section has not thrown segmentation faults so lets focus on it please. I am working on multithreading a data server application. I am new to multithreading in general. I wrote a version a ...
1
vote
2answers
115 views

Open server asking for a password

It first creates a server and waits to connect. Once the client connects to the server he gets the line. If he puts the correct code he gets output -> good job. If not -> the software disconnects. My ...
11
votes
2answers
59 views

Raw Text TCP Client v3

After studying and considering the reviews for this code, I began working on the code, and came up with this. It has much better error and disconnect detection, and it also resolves addresses: ...
13
votes
5answers
764 views

Raw Text TCP Client

Yesterday I posted a request for a code review. After reviewing the code and the reviews, and after some sleep, I decided I can do better. In fact I logged on with the intent of deleting the question ...
7
votes
1answer
52 views

Python Socket Receiver

I put this together and am having some doubts to the number of connections I can make. I also doubt if I can brute force the server to serve up connections and then hang. Please take a look and tell ...
4
votes
3answers
67 views

Fetching filesystem directory listings on a server

I developed a server which takes a directory name then lists files in it and sends this list to a client. And I want that server to work with Telnet. It works but I have some questions on how I can ...
0
votes
0answers
72 views

Unit testing Socket communication with a race condition

I've developed a library that wraps TcpClient TcplListener objects into the concept of ...
5
votes
1answer
83 views

Java NIO Server Scaling

I wrote a Java NIO Echo Server and want to maximize the number of connections to the server. The problem is that when I try to connect more than 10k clients the clients get their connections refused: ...
1
vote
1answer
52 views

High-volume object-passing from client to server

I have 1 client and 1 server. Client passes Java objects (throughput 10000/sec). I am using Netty. I am short on CPU and this code consumes a lot. I have to make Server1 (Netty Client) talk to ...
7
votes
2answers
266 views

TCP socket retry mechanism

I am writing a C++ client application which will send some data to server and wait for its response. Now the protocol is to wait for a specific timeout and then retry for specific times. If all goes ...
7
votes
1answer
98 views

Simple C Port Scanner

I have been writing a Simple Port scanner in C, once I got it to work I decided I wanted to make it faster because it takes a very long time for it to get done with scanning all of the ports.Is there ...
3
votes
1answer
399 views

Efficient Ring Buffer (FIFO)

I need to implement a Ring Buffer/FIFO for data coming from a TCP socket. It must support the following operations: Append a the recv()'ed chunk of bytes. Allow me to peek at the beginning of the ...
6
votes
3answers
545 views

AsyncTcpClient (Asynchronous TcpClient)

I've been doing network programming using C#'s TcpClient for several years. The code below is an asynchronous wrapper for ...
0
votes
1answer
155 views

Network Send and Reply

I have developed a TCP listener to receive messages from a client machine, take that string and put it in a db, then send back a response with some data relating to that string. First attempt at a tcp ...
3
votes
1answer
74 views

Custom TcpListener

I have only been coding C# for a short time and I can't say I'm an expert but I am rather enjoying it. I wondered if you could see any way I could improve my code. ...
7
votes
1answer
425 views

TCP Server using NIO to save data from IoT clients

I've built a small single threaded TCP server using NIO. This server is used by small client devices to report things like temperature, when the device has been switched on, when it switches off, and ...
4
votes
2answers
695 views

TCP chat application with both server and client logic in same application

Here is my simple chat program. I'm wondering whether it has an acceptable design (both object oriented design and network design). If you want to run it, I can provide the solution folder. ...
5
votes
1answer
442 views

TCP Client-Server communications

I have developed this simple TCP Server/Client communication program, and am looking for ways of lowering the code footprint where possible.Side note, Both Classes are Main as they run independently, ...
4
votes
1answer
1k views

Creating a TCP Listener and receiving data

I am very new to network programming and I'm thinking I have probably misconstrued the creation of an appropriate TCP listener. The code I have below works perfectly, but I have a feeling it's a "hack ...
7
votes
3answers
796 views

TCP Chat (Server/Client)

I'm looking for some hints or advice regarding efficiency, performance and some good coding practices. Also I'm curious about synchronization. The server is multithreaded, so I think some operations ...
3
votes
1answer
163 views

Basic TCP server client application

I've written a basic server/client application to use in an automation application written in C#. The code is working pretty good, but I have a few thing I want to improve: Server: ...
7
votes
1answer
742 views

Custom TCP Java proxy socket load balancer

I'm working on implementing a custom TCP proxy server which acts like a load balancer. The proxy server will accept client requests and then forward them to available hosts. I am concerned about the ...
1
vote
1answer
277 views

TCP Server with multithreading

I am working on a banking application. I want to create a multithreaded TCP Payment Card (iso8583) server that can handle passbook printing requests simultaneously. Multiple devices are connected to ...
5
votes
6answers
710 views

TCP communication with step motor

I have a class that I use to communicate with some hardware equipment (a step motor to be precise): ...
2
votes
1answer
1k views

Simple TCP Client Server application with receive side only

I wrote simple TCP Client Server application, I was wonder could you please review my code. I would be grateful for any hints and tips regarding to logic of app, coding style or naming convention. ...
5
votes
3answers
250 views

Latency problem for keyboard remoting from Android phone - follow up

I'm writing a simple remote PC app (mouse-keyboard). Android is the client and is connected with WiFi to Java PC Server. I'm using TCP but I see a bit of latency compared to other remote apps. I'm ...
7
votes
1answer
282 views

Latency problem for keyboard remoting from Android phone

I'm writing a simple remote PC app (mouse-keyboard). Android is client and is connect with WiFi to Java PC Server. I'm using TCP but I see a bit of latency compared to other remote apps. Then I used ...
3
votes
1answer
663 views

Is this the right way to use TcpListener in the background?

I have a server application using TcpListener in BackgroundWorker, where my application is doing some work, and in the ...
4
votes
1answer
3k views

Async TcpListener

I'm trying to implement a TcpListener using the TPL. I'm not sure If I'm doing everything correctly though. I'm trying to keep the code as small as possible as well. It all works fine in a console ...
3
votes
1answer
4k views

Basic TCP server application in C# using async / await [closed]

I'm trying to get started with network and parallel programming in C#. I'm almost a complete novice in programming, so I'm looking for feedback on a small script I'm writing. The goal of the ...
3
votes
2answers
263 views

Peer Review of TCP Client Program Code

I'd like to have this code looked over because I feel my approach might be very novice and there must have to be a more elegant or at least less "grunt-work" way of doing it. I have to write a small ...
4
votes
1answer
7k views

WPF async await TcpClient/TcpListener sample

I want to build a robust and highly scalable client server system. Here what I have so far(an echo server as my base of implementation) My Server ...
6
votes
1answer
4k views

Performant C# Socket server

I am creating a performant C# socket server. I'd like it to be able to accept as many simultaneous connections as possible. I've tested with 100 clients and all clients are fine. With 1000 however, ...
2
votes
3answers
4k views

Detecting socket disconnect in .NET

First off, I know there are other solutions and practices but I'm referring to MS proposed code from .NET documentation. It goes like this: ...
4
votes
2answers
4k views

Which is fastest: Write to Stream or BinaryWriter?

I've noticed that there are several ways of sending data through a TCP stream. I want to do it the fastest way in terms of latency. One method I became aware of is with a binary writer: ...
8
votes
2answers
13k views

Console chat server

I'm just looking for feedback on correctness of my understanding of async/await. I'm curious about the Task.Run inside of the ...
1
vote
2answers
118 views

Getting a monitor packet

The following are an example of methods supported by a proprietary device: Monitor ControlTemp PutPeakInfo GetPeakInfo I have a class that builds the packets for ...
1
vote
0answers
2k views

Transmitting/Sending big packet safely using TcpClient/Socket

I am writing a TCP based client that need to send and receive data. I have used the Asynchronous Programming Model (APM) provided for Socket class by the .NET ...
3
votes
1answer
844 views

Sending large data package with TCP - winsock

A small struct is sent beforehand to the client that specifies package_size amount of data should be received which is what ...
3
votes
2answers
6k views

Multithreaded Socket code to connect to 100 different machines

This is my socket.cpp ...
5
votes
2answers
892 views

TCP socket server for UNIX

I'm very new to C++, but I really want to write good code and increase my development skill, so I ask you for some review. Scheme of socket server This is the scheme of how my socket server works. ...
6
votes
1answer
8k views

Stupidly simple TCP client/server

I'm trying to validate some results that I see when using NetPipe to test some connectivity between a couple of Linux boxes (over various hardware). So, I concocted this simple client and server to do ...
4
votes
1answer
368 views

Loading data from a remote app

I have a method which loads data from a remote app (send TCP request and parse response). Now, I have a simple class for sending a TCP request: ...
2
votes
2answers
2k views

TCP/IP sending and receiving threads

It's my first stab at TCP/IP and honestly I'm just starting out on C# also, so any comments on the design, method, etc are more than welcome. Basically I wanted to create a listening thread and ...
11
votes
4answers
21k views

TCP Socket Server

I've only been coding C# a few weeks and was just hoping for a little constructive criticism of a socket server I've been working on: ...