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

3
votes
1answer
43 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 ...
0
votes
0answers
14 views

TCP server/client application [on hold]

I'm trying to figure out why my server will not print to my client when I run my java classes within the terminal. The client will correctly send information to the server, the server does it's work, ...
6
votes
3answers
95 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
43 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
54 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. ...
5
votes
1answer
77 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
151 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
99 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
145 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
209 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
77 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
319 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
171 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
695 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
509 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. ...
2
votes
0answers
87 views

Latency problem for keyboard remoting from Android phone - follow on [closed]

This is a follow on question to these previous questions: Both TCP and UDP implementations Modified TCP-only solution I'm writing a simple remote PC app (mouse-keyboard). Android is the client and ...
5
votes
3answers
214 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
248 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
426 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
2k 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
3k 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
210 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 ...
3
votes
1answer
5k 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
3k 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
3k 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
3k 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
12k 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
0answers
1k 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
683 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
5k views

Multithreaded Socket code to connect to 100 different machines

This is my socket.cpp ...
5
votes
2answers
757 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
6k 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
355 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
19k 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: ...