Questions tagged [tcp]

TCP is a reliable transport layer protocol that ensures an ordered and connection-oriented data stream service.

Unable to connect beyond the local network using Socket.io

server.js import { Server } from "socket.io"; const io = new Server(8000); io.on("connect", (socket) => { console.log(`connect ${socket.id}`); socket.on("ping", (cb) => { console.log("ping"); ...

Obtain the duration of processing for kafka messages

I offer two main services: producer and consumer. My understanding is that message.ts represents the time at which the producer created the message, not when it was received by the kafka-broker. Questions When the consumer processes the message, how ca ...

Setting the starting sequence number for a TCP socket

I'm currently involved in testing and I require the ability to set the initial sequence number (ISN) of a TCP connection to a specific value. The ISN is typically a random value chosen by the OS/Network Stack, but I need to have control over it. Is there ...

Unable to establish TCP port connection from an external host

Seeking assistance desperately! I've been grappling with this issue for hours now. I'm at my wit's end, exhausted from scouring every possible resource with still no solution in sight. The predicament I find myself in involves a Python scri ...

What is the method for reaching the electron process from a different npm process?

Recently, I developed a script that sets up a TCP server to listen for incoming requests and triggers a Windows notification upon receiving one. Here's the code snippet: const notifier = require('node-notifier'); const path = require('path'); const net = r ...

A step-by-step guide to setting up TCP hole punching using node.js

I've been experimenting with TCP hole punching using Node.js, and I'm not sure if the issue lies with my NAT or the code itself. The main goal of the following code is to: Allow 2 clients to register on a server with their respective address an ...

What is the best way to transmit a UTF-8 encoded JSON string over TCP using Python?

I've been struggling to send a UTF-8 encoded JSON string over TCP (Python 2.7). Below are some attempts and their results. The 'response' variable contains the JSON string I'm trying to send: response = {"candidates":{"P":[{"mentionname":"Beyoncé","guess ...

Python TCP server experiences issues when running over the internet

I stumbled upon this tutorial to learn more about TCP and networking. I successfully tested the code on localhost, but encountered an issue when trying it with my real IP address. My friend attempted to run the client on his system, but we kept getting the ...

Implementing TCP delayed acknowledgment in Node.js using the Express framework

During my stress test on nginx with nodejs backends, I encountered a delay related to keepalive. Surprisingly, even after removing nginx from the equation, the problem persisted. My setup includes: ApacheBench, Version 2.3 Node v0.8.14. Ubuntu 12.04.1 ...

Can TCP Net and HTTP Server Crash in NodeJS when Errors Occur?

Currently, my NodeJS server is set up to operate on two different ports: One port for the net TCP server, which connects to telematics hardware devices sending data messages And another port for the HTTP server to manage the web app platform These funct ...

Obtaining the TCP Socket ID Upon Establishing Connection with the Server

One question I have is, How can I retrieve the TCP Socket Id when it's connected to the server? Here's the code snippet I am working with: const net = require('net'); const server = net.createServer(); server.listen(port, host, async( ...

What is the process for creating a connection reset in a programmatic way?

Have you ever encountered the frustrating "the connection was reset" message while attempting to surf the web? (This specific text is from Firefox, other browsers may vary.) Occasionally, I find myself needing to intentionally trigger this error message i ...

Link Android with Python

I am working on an Android application that captures images and also have Python code for extracting image features. I am looking to connect these two components so that the Python code can receive images from the Android application. I have heard about bu ...

Having trouble establishing a connection between Node.js and SQL Server using Tedious library

When attempting to connect to a local SQL Server instance using Node.js and Tedioius, I encounter the following error: { [ConnectionError: Failed to connect to XXXXX:1433 - connect ECONNREFUSED] name: 'ConnectionError', message: 'Failed to connect to ...

Is there a way for me to determine if an open port is TCP or HTTP?

Currently, I am using a Windows server (Windows 7), and when I run the netstat -an command, it only indicates whether ports are TCP or UDP. However, I have discovered that node.js differentiates between HTTP ports and TCP ports (example found at the bottom ...

Flowing Waterways and Transmission Control Protocol

I have a unique piece of code that I recently discovered. After running it, I can connect to it using a Telnet client. const network = require('networking'); //creating the server const server = network.createServer(function (connection) { console.lo ...

The TCP Server functionality is restricted to the localhost environment

While I can successfully establish a TCP connection between a TCP client and TCP server on localhost, I am facing difficulties when trying to replicate the same setup for connections involving different computers within the same network range. Specifically ...

Node.js TCP punching holes

I'm currently attempting to establish a TCP connection between two devices behind separate NATs using node.js. One obstacle I'm facing is determining how to specify the local port for this connection. Any insights or suggestions would be apprecia ...

TCP connections without an HTTP protocol on the Cloudfoundry platform

As a beginner mobile developer, I am exploring the use of Cloudfoundry's services to host my server for handling chats and character movements. To achieve this, I am utilizing Noobhub, which establishes a TCP connection between the server (Node.js) and cli ...