Stack Exchange Network

Stack Exchange network consists of 174 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

Questions tagged [tcp]

The tag has no usage guidance.

-1
votes
1answer
65 views

How to determine the application used on top of TCP?

I am currently implementing a TCP Proxy Server. The huge problem I have right now is that, based on the clients' TCP data, I am trying to determine whether the client is making an HTTP, FTP or SMTP ...
1
vote
1answer
46 views

How to control multiply consoles from Java code?

I have Java application. I try to realize multiplayer chat with TCP protocol, but I have an issue. I cannot output all messages I get on client tier (server tier works perfectly), because I give ...
1
vote
0answers
14 views

Client synchronization of authentication tokens in parallel connections

In my app server's authentication implementation, an authentication token is generated for every user that has logged in. According to some highly recommended security tips (Implementing Secure User ...
0
votes
1answer
50 views

What should installer do during installation process, when default port it runs is currently used by another app?

I'm quite newcomer to the programming. I've currently faced issue described in the title. When there's already app running on default port 8080, after my app installation ends I have to change this ...
3
votes
2answers
233 views

Has CRC check on top of TCP any meaning?

For our project, a protocol is specified for communication between an embedded linux device and a PLC/HMI. This protocol includes CRC checking. However, the communication is now done over TCP (TCP ...
1
vote
1answer
122 views

Theoretical: How Do Servers Handle Requests With No Spare Memory?

I'm trying to understand how servers handle many requests when they start to run out of RAM. Let's say you have a server with 1GB of idle RAM. Let's pretend it was bombarded with 1024 requests in 1 ...
1
vote
0answers
539 views

what's the maximum number of simultaneous java socket connections in the cluster?

we work within a cluster of 1 gb/s of bandwidth, we use java sockets to perform some data transfer between the cluster's nodes like broadcast and shuffle (nodes of the cluster exchange data) in the ...
1
vote
1answer
67 views

Is there a simple way to call a method on an object in another program with a given id over TCP?

I'm working on a project where I have two programs which need to invoke methods on some of each other's objects. I do this by sending JSON objects over a TCP connection. These objects have a ...
-1
votes
1answer
103 views

How to secure the server-to-server comunication between two endpoints?

Currently, I'm using these methods on HTTPS protocol: SSL to secure the communication between two endpoints CheckSum to generate a hash token that only the two endpoints can generate Is there any ...
0
votes
1answer
275 views

Replacing HTTP with plain TCP in a client-server application

I'm building a small application composed of: Client (command-line) Business logic (remote server) It's a simple game of tick-tack-toe where the client sends information to the server about which ...
2
votes
1answer
475 views

Scaling tcp/ip socket server applications

I have been trying to understand how one would scale an application utilizing tcp/ip sockets for client server communication. For example in the simple diagram below: +------------+ | ...
4
votes
1answer
623 views

Understanding architecture of NGINX

According to this article, nginx has a master process and a number of worker processes. I'm trying to understand how a request is handled by the nginx worker processes. nginx uses an event driven ...
3
votes
2answers
257 views

Is briefly closing a listen socket then re-opening it a horrible idea?

I'm writing an application on x86_64 CentOS 7 that functions as a server, managing potentially thousands of devices. Because my application doesn't do so well when running through the connection ...
3
votes
1answer
238 views

Between JS clients and a Unity game server : TCP or UDP?

I'm currently building an interactive game which has a very special use case : The game is displayed on a giant screen on stage in a theatre, and the audience can play it with their smartphones (http:/...
1
vote
1answer
560 views

Implement a HTTP server on top of NodeJS TCP APIs for learning purposes

I am very interested to learn the HTTP protocol in depth as well as understand the working of NodeJS streams up-close. I figured out that the best way to do this would be to develop an HTTP server in ...
0
votes
1answer
121 views

Real-time application : Is this a good way of communicating with my server?[very frequent transmission]

I'm making an application that collects timestamp and GPS data from a user's phone in intervals along with some other information. Currently, every tuple generated is sent via TCP to my application ...
6
votes
1answer
473 views

Low latency TCP sockets in .NET

Is it possible to optimize a .NET application running on a server version of Windows for near-zero latency TCP communication? Or will there always be unpredictable/unavoidable delays? For example, ...
5
votes
3answers
1k views

Local client-server communication through files or TCP?

I have a Python client launching a subprocess in C++. The C++ program runs several threads that need to report results to the Python client. Knowing that both the Python client and the C++ ...
10
votes
2answers
16k views

TCP or UDP for a multiplayer game?

This is a question I see a lot. Most people say UDP always for real-time games over TCP. My understanding is that TCP tries to re-send packets over and over til the other side gets them whereas UDP ...
1
vote
0answers
675 views

How to properly construct a TCP Tunnel in Delphi

I'm working into a project that needs to implement a Reverse Socks5 connection. In practical terms, the browser (Chrome/FireFox/Opera/IE) will connect on a local socks server (127.0.0.1:8080), and on ...
1
vote
0answers
100 views

Background TCP server to collect data

I have an OpenGL application that plots data in real time. I would like to have a background TCP server that will accept data from a client without blocking on a call. The data is originally an ...
0
votes
2answers
1k views

Is SMTP client created in singleton scope or request scope?

In a web application, we create an email provider, which in turn creates an SMTP client: my question is whether we should create an SMTP client per request or create only one client and have it ...
1
vote
1answer
493 views

How should I protect the data sent over a tcp socket?

I have two applications. The client application is written in .NET and the server application is written in native C++. I am using TCP sockets for data communication between the two applications. ...
1
vote
2answers
46 views

Can packet sizes be relied upon in TCP/IP, at least for the first read() call on a connection?

Assume you have a client application which is known to connect to a given IP, and send a fixed size message (of size X = ~dozen bytes) upon connection, and wait for a reply. If you're writing a ...
0
votes
2answers
613 views

Asychronous TCP File transfer

I have an asychronous file transfer using boost::asio. Multiple files can be transfered at the 'same time'. Same time as in - file packet for file 1, next packet for file 3, next for file 2, ... No ...
13
votes
3answers
2k views

Is it a good idea to multiplex blocking streams into a TCP connection?

I need several duplex channels between two hosts. There are a number of advantages to establish only one TCP connection. But I doubt multiplexing would cause some inevitable problems. Will it harm ...
2
votes
1answer
639 views

Is there a cross-platform way to open a TCP connection, send a HTTP post request and keep the connection open?

I'm searching for a way to open a TCP connection, send a HTTP post request and keep the connection open. It would be great if I can achieve this without administrator/root rights, from a command-line ...
1
vote
2answers
62 views

What is the best method for transfer wide range of data into another networked PC?

I have some network device(IOT) that contain temperature sensors to collect the temperature of milk mixing tanks and send that temperature to another networked computer.I have more than 100000 of ...
6
votes
2answers
649 views

How to handle thousands of messages to C socket?

I currently have a setup looking like this: __________________ _________ ________ ___________ | Front end server |----| Varnish |----| NodeJS |----| C-service | ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ ...
1
vote
3answers
324 views

Best Communication strategy for monitoring dashboard

I have a requirement where I need to display certain stats on Admin Dashboard in my web application (Angular+Java). These stats (transnational data) are being generated on different servers (connected ...
2
votes
1answer
427 views

How to detect network interruptions

I want to write a kind of "diagnostic function" which is able to detect when a TCP/IP based network is interrupted. I would like to connect two endpoints and detect when an established connection ...
3
votes
1answer
331 views

Distributing work between TCP Clients

I have an application (run by a Windows Service) which connects to a TCP server (let's call the service 'Listener' from here on). [It's important to note that the TCP server is out of my reach, and ...
6
votes
2answers
2k views

TCP - Three Way Handshake, which Port?

I am trying to understand the Three way handshake in the TCP connection setup. My book states, the client first contacts the server, say we want an HTTP connection, so it sends a SYN to port 80. (1) ...
1
vote
3answers
277 views

Is a TCP client/server a good solution for a system which can be controlled by a GUI running on multiple platforms?

Consider a software which runs on a dedicated system (basically a Linux box), and controls some machinery. The system has all the required hardware interfaces for the task. The software also has a GUI ...
5
votes
4answers
631 views

Is it true that for Observer Pattern to work, there probably is some polling mechanism underneath?

The short question is: is it true that for Observer Pattern to work, there probably is some polling mechanism underneath? (update: in a network situation) It was quite amazing that if on my Macbook ...
1
vote
1answer
3k views

Set keep-alive for Java ServerSocket

In a multi client server application, I need to know when each client connection is dead on the server side. After set keep-alive for client (and change default time from 2 hours to 10 second) each ...
0
votes
0answers
666 views

Multiple TCP port requirement for a client-server relationship

I designed a basic C# TCP sever that listens on some port. I extended this into 4 other servers that perform very different tasks, but together make up one product. The client needs to connect to each ...
2
votes
1answer
604 views

Web Service or pure TCP

We are trying to establish a 6LoWPAN network. Our Devices have only the 6LoWPAN connection so we need a bridge to connect them to CMS server. A small computer (something like BeagleBone) which runs ...
3
votes
1answer
252 views

Is TCP still considered siginificant overhead compared to UDP? [closed]

I'm working on a distributed application for a graduate class I'm taking. There has been much discussion around implementing a way to maintain peer connection health statuses. Think Gossip. One of the ...
4
votes
2answers
1k views

How can I write a flexible messaging structure for sending TCP messages to clients and server

The general question: how can I write a flexible, but not property heavy, messaging structure for sending TCP messages to clients and server? Example: I have a TCP Server for a game that sends some ...
1
vote
0answers
769 views

Architecture for C# Chat Application - not sure if WCF is right

I had written a WCF based "chat/notification" system but I am questioning my decision if WCF is a good fit. I have an external 3rd party lib that calls my process when events arrive: public class ...
1
vote
1answer
687 views

How to scale a C# server application

I'm writing a pretty simple TCP server/client application for the first time. It is a personal project for education, but I really like my applications to be extendable and to scale in case the code ...
0
votes
2answers
83 views

Connect PC application to a group of similar hardware devices, using TCP

Our company has started to design a system where many (typically 4 or 6) force-sensitive platforms, containing load-cells, would stream data to the PC via TCP. Each platform and the PC shall be ...
3
votes
1answer
138 views

How can I get the transit time for packets for a jitter buffer?

I'm trying to wrap my head around the concept of a real jitter buffer. I'm basing the only knowledge that I have around this article: http://toncar.cz/Tutorials/VoIP/VoIP_Basics_Jitter.html This ...
1
vote
3answers
1k views

How to test Windows .NET TCP program handling of connection failure [closed]

I've written my own C# TCP communications module (using SocketAsyncEventArgs, although that's presumably irrelevant). My module runs at both ends of the connection, client and server. As part of the ...
7
votes
4answers
2k views

Is there any way to establish a direct connection between 2 mobile devices over internet?

In the company I’m working we have our own iOS\Android\WP apps which allow our employees to share a certain type of files to each other. This app works through our server but recently we encountered ...
0
votes
1answer
126 views

Is this architecture feasible? Maintaining two tcp sockets open from the server to two clients in order to relay events between the two

Basically I need to keep track of two clients and need pass messages between the two. I am thinking of creating a tcp connection between the clients and the server and using the server to manage this ...
-1
votes
3answers
2k views

what are the limits of the client server architecture [closed]

i have developed a POS app as a stand alone app with its own database. A customer needs 10 of the app in different PCs, but it should use one database. This quickly brings a solution to mind. A Client/...
0
votes
1answer
1k views

HTTP keep alive and TCP persistent connection

What's the relationship between the two concepts? Is one HTTP Keep-Alive connection always over a long persistent TCP connection? When the HTTP connection is closed, will the TCP connection be closed ...
1
vote
0answers
939 views

listening to packets in promiscuous mode

I am working on an application that get packets that don't belong to the pc,so i use promiscuous mode on my NIC,i need to read the packet and and handle it. Because i don't have any connection formed ...