Questions tagged [tcp]

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

Filter by
Sorted by
Tagged with
-2
votes
0answers
20 views

Python socket TCP hangs on in operation socket.recv(1024)

How to fix this code so that sock.recv(1024) does not hang on? As for now it does import socket import sys HOST, PORT = "localhost", 8888 data = "christmas" with socket.socket(socket.AF_INET, socket....
0
votes
1answer
23 views

When exactly does dotnet's tcp socket's send method not send all bytes?

Like all socket APIs, it says that it returns the number of bytes actually sent. Under which circumstances does the returned number not match the input's size? My naive assumption was that it would ...
0
votes
1answer
19 views

Using struct.pack to get total size of file and send it to server via TCP socket

I'm trying to get total size of folder with all subfolders and files using following code: def getTotalSize(self, filename): try: total = 0 start_path = filename for path, ...
0
votes
0answers
17 views

ftp bandwidth limitation issue [closed]

After several days having broken my head on this problem, I find myself forced to seek help from the community. I have a dedicated server at Serverius connected in 10Gb/s. When I download a file in ...
0
votes
0answers
8 views

Does AWS NLB pass through SNI values when terminating TLS? (Routing via SNI)

AWS Network Load Balancers support TLS termination. This means a certificate can be created in AWS Certificate Manager and installed onto a NLB and then TCP connections using TLS encryption will be ...
0
votes
2answers
20 views

How does SSL handshake caching and expiry works

I am trying to figure out about the additional overheads with respect to time when it comes to SSL handshaking and TCP Handshaking. So what I know is that SSL Handshaking happens over TCP layer. And ...
0
votes
0answers
16 views

Android 10 inputStream times out on readLine

Simplified code: Socket mysock = new Socket("192.168.1.1", 1234); mysock.setSoTimeout(15000); PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(mysock.getOutputStream())), ...
0
votes
0answers
8 views

nginx as reverse proxy for TCP(443) and HTTP application not working

Trying to configure nginx as reverse proxy for a tcp(443) and http application, nginx is able to route traffic for http application but for the tcp application. Location(/) is sending to TCP ...
0
votes
1answer
11 views

TLS - connecting to server port 80 over 2 different client port

I am currently working on TLS protocol by using openSSL library. I have a server which listens on port 80 with max 5 connections. When I want to connect from 2 different applications over different ...
-1
votes
0answers
14 views

TCP/IP Socket Client on Android device with StaticIpConfiguration [closed]

Anyone suggest me the simple approach to send data through TCP/IP on android in Local Network Wifi connection with staticIp.
-1
votes
1answer
13 views

How does android implement the app for background tcp alerts

I would like to program an APP that can be resident in the background and connected to the server to trigger a vibrator alarm when a specified message is received. In other platforms just open a ...
0
votes
1answer
18 views

Where is the IP Address is a TCP header - How does Layer 3 know were aplication is sending the packet

The TCP header includes the port information - understood. But as the packet/segment is sent down to Layer 3 to encapsulate it as an IP packet, how does layer 3 know what destination IP address to use ...
0
votes
2answers
21 views

Why is TcpClient.Connect() throwing System.AggregateException

I am trying to check the TCP connection to a localhost TCP server (ActiveMQ broker) using following code: string host = "localhost"; int port = 61616; using (TcpClient tcpClient = new TcpClient()) { ...
-1
votes
0answers
13 views

Tunnel serial to ethernet centos 7 [closed]

I have a lab equipment that uses serial communication. I recently bought an serial to Ethernet adapter which assigned an IP to the device. Now I am trying to get the data sent from the equipment to ...
-3
votes
0answers
23 views

Is it possible to identify a packet as UDP or TCP without any other context? [closed]

Given a dump from Wireshark or similar, I'm trying to examine the headers to determine the packet type. I can check the first two fields for valid port numbers, but that doesn't accomplish anything ...
-1
votes
1answer
27 views

Trying to write script, that would download all subfolders inside folder [closed]

so I'm here again with my handsome script, that should download data from my second computer using TCP sockets. I've got a couple of questions, that I was not able to find on google. Question n.1: ...
0
votes
1answer
36 views

How do I establish a UDP connection after a TCP connection?

Hi guys I'm currently developing a C project in which we basically need to connect N clients to a server through a proxy. I'm doing the first connecting using the TCP protocol. After this, the client ...
-2
votes
0answers
16 views

Why won't TCP adjust the size of the segment? [closed]

I am sending an HTTP request with body that it is large enough for request to get segmented into multiple packets of sizes 374B (headers), 1500B and 199B. Since some of our network equipment has a ...
0
votes
1answer
15 views

What will happen if the socket buffer size is not enough

I've known that each socket has a buffer to read or write data. For example, on a Linux server, we can check the buffer size with the command cat /proc/sys/net/ipv4/tcp_rmem and cat /proc/sys/net/ipv4/...
0
votes
0answers
23 views

Socket is not opening port on my connection [closed]

I am building a program that uses sockets (TCP), I am transmitting data from the client to a server and then the server will send a response, this works fine when I run on a virtual server, however I ...
-3
votes
0answers
16 views

How to display the information structure of the packet received via TCP? [closed]

In Client / Server program that operates on the TCP protocol, how to display the information structure of the packet received from the Client?
-1
votes
0answers
9 views

forbidden unknown far end TCP in Avaya cm [socket changing]

I am facing an issue associated with Avaya cm PBX with TCP transmission. I made a sip application which supports incoming and outgoing. but associated with Avaya cm outgoing is not possible after an ...
-1
votes
0answers
10 views

What does the server see when sending messages on socket.sendall()?

I'm sending messages through sockets using the socket.sendall() function. Since this function requires my messages to be a bytes object, I have been using the encode() function to convert my strings. ...
0
votes
1answer
51 views

Python TCP socket client/server receiving incorrect data

I have a separate log file recording the data. After the Python script runs for sometimes, like 24 hours, some data are different from the log file. The log file has the correct data and the data is ...
4
votes
1answer
66 views

Missing one-pixel row while transfering image with TCP socket

I'm facing strange error right now, I have python script, that is sending/receiving data using TCP socket, everything works fine, but when I'm trying to download image with this script, it will ...
0
votes
0answers
12 views

Handling connection establishment when provided a special address format (Windows)

I need to establish TCP connections based on special addresses of the form "specialpattern_machinename". When such a special pattern is encountered, I have to go through a multi-step procedure to ...
0
votes
1answer
16 views

rsyslog send log over RELP fails

I am trying to send a log file to a server using rsyslog RELP. The configuration on the client is as follows: /etc/rsyslog.d/00-userlog.conf module(load="imfile" PollingInterval="10") module(load="...
2
votes
1answer
29 views

How to change TCP Congestion Control algorithm using setsockopt() call from C++ code

Is it possible to change TCP congestion control algorithm from Cubic to Reno or vice versa using setsockopt call from C++ code in linux? I am looking for an example code of doing so.
0
votes
0answers
17 views

How to connect to Traefik TCP Services with TLS configuration enabled?

I am trying to configure Traefik so that I would have access to services via domain names, and that I would not have to set different ports. For example, two MongoDB services, both on the default port,...
0
votes
0answers
26 views

will linux tcp purge the pkts in qdisc when do tcp_close?

I noticed that when do tcp_close, it will purge recv queue & write queue, however, i have not found that it tries to purge the queue in Qdisc. I missed sth or it has indeed not purged the packets ...
0
votes
0answers
17 views

How to handle multiple incoming TCP connections in certain order for server in Ruby?

I am writing a basic TCP server in Ruby that can handle a few basic operations using an in-memory data structure. It can handle a few basic methods to insert data or retrieve data from memory. That ...
0
votes
0answers
17 views

STM32 LwIP netconn_write problem transmitting structs

I am using LwIP stack with FreeRTOS in STM32F407Discovery board as TCP Client and I have a Linux computer as TCP Server. I faced a problem during transmission of a struct array, say struct EncoderData ...
0
votes
1answer
28 views

Python socket error 10054, connection was interrupted by remote host

i am trying to set up communication with an ethernet device connected to my computer. Connection seems to work ok, when i connect the socket to the device's IP address and port, but when I try to send ...
0
votes
1answer
44 views

Golang. Error “An established connection was aborted by the software in your host machine”

back code (Go): var upgrader = websocket.Upgrader{ ReadBufferSize: 1024, WriteBufferSize: 1024, CheckOrigin: func(r *http.Request) bool { return true }, } // ...................
1
vote
0answers
19 views

“Connection timed out” error when TCP keep_alive properties set on an Android app's TCP socket

I am using the following options to set TCP keep_alive properties on my socket running on Android connected to server running Linux. int idleTimeout = 3; setsockopt(socketDescriptor, SOL_TCP, ...
0
votes
0answers
16 views

TCP Reset Attack

I'am trying to implement a PoC for the TCP Reset attack. I am using 3 VMs(host A, host B and the attacker). Host A connects through SSH to host B. The attacker sniffs the connection between the 2 ...
-1
votes
0answers
13 views

Socket Buffer overflow in spite of low cpu utilization and %iowait [closed]

it seems that there is a socket buffer overflow for my tcp connection, even though i see that %cpu utilization and %iowait as seen from sar report is negligible.I do see that number of tps is high and ...
0
votes
0answers
10 views

Android tcp connection

try{ Socket mSocket = new Socket(); mSocket.connect(new InetSocketAddress(ip, port), TIMEOUT_API_CALL); reader = new BufferedReader(new InputStreamReader(mSocket.getInputStream())); ...
1
vote
0answers
38 views

Socket accept - “Too many open files” even if close(sd) is called [closed]

I am working at a HTTP server side in C. Everything from the request handling to loading the files to the client works correctly. The problem is that I end up with a Socket accept - “Too many open ...
-1
votes
0answers
17 views

Learning to script (Creating HTTPS connections and DNS resolvers) [closed]

I wanted to practice by creating a Python script that will basically connect me to a WebPage (which I will later on change to do other things) and I wanted someone with a bit more experience to have a ...
1
vote
0answers
14 views

Is it necessary to use a queue to save messages received from clients and pending to be forwarded to the backend server?

I want to write a Proxy Server for SMB2 based on Asio and consider using a cumulative buffer to receive a full message so as to do business logic, and introducing a queue for multiple messages which ...
-2
votes
0answers
20 views

NodeJS Leaking Huge Amounts of Memory on TCP Socket? [closed]

I'm making a TCP Socket that proxies to an API and one of the API endpoints returns a file, with a size of 30MB to be exact. So inside my code, I make a request with axios to get this 30MB file and ...
0
votes
1answer
44 views

Spring Boot Integration - Send greet on connection initialization

I am writing a simple TCP Server application with Spring Boot Integration Framework that has to send a greeting to the client on connection establishment. The workflow should be as follows: Client ...
1
vote
0answers
29 views

read and write data from AB PLC or any other controllers using C#

I am new to C# and .NET programming so please forgive me if my problem doesn't make sense to you. I am trying to make an application that can read and write data from PLC(Allen Bradley compact logix) ...
0
votes
0answers
10 views

how to make an audio conversation tcp-ip in python? [closed]

I want to make a program to communicate 2 clients in tcp-ip for audio in python 3.7. how to do it ? With which module ? thank you.
-1
votes
0answers
19 views

When flutter-app send message to server, the c# server only prints it out, when the flutter-app(client) gets disconnected

Description of the problem: The c# server works perfect with a c# client, but when I try to join on it with a flutter application(Dart client code), it sends the "hello" message to the server, only ...
0
votes
1answer
16 views

How do CGI scripts know the IP address of the requestor?

CGI scripts can access the IP address of the source host using the REMOTE_ADDR variable. But CGI exists on the application layer, so how does it know network layer information? If you look at HTTP ...
0
votes
0answers
7 views

Multi Client video tcp stream intel realsense

The intel - real sense camera provides two video streams at once, a rgb as well as a depth stream. I now need to make those two streams separately accessible locally over a server for multiple clients....
0
votes
1answer
79 views

Checking server for tcp fastopen support

Is it possible, and if so how, to test if a server supports TCP_FASTOPEN? Specifically, I would like to check if Google Cloud Storage supports it.
1
vote
2answers
16 views

How to find the Client country from the Rails TCP server is getting use in Rails?

I am using Rails 5 with ruby 2.4 I am using TCP server for the TCP api communication. I am able to find the Ip address from which the request is getting generated like: require 'socket' ...