My company releases a special TCP stack for special purposes and I’m tasked with implementing RFC793 compliant closing sequence. One of the unit tests has a server working on top of the special TCP stack talking to a normal Linux TCP client, and I’m running into some strange behaviour that I’m not sure whether is caused by programming error on
Tag: tcp
One way communication over TCP Socket [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 5 years ago. Improve this question I am trying to send some data to a remote Raspberry Pi over TCP socket from a GUI that I designed with Python. I’ve implemented
SIGPIPE in C++ determining which TCP socket is disconnected
I’m using Linux/Ubuntu. I’ve written a pair of classes that implement a TCP server and TCP client, respectively. Part of the code is to have graceful recovery from disconnects. My only problem is with SIGPIPE. I’ve written code to capture the signal, but I’d like it to start the “attempt to reconnect” process on the class instance that hit the
Multiple parallel tcp connections
My (linux) server has two public IPs and I would like to make some parallel connections, to a same or different servers (my server acts as client program here; it just runs a C++ program that communicates with other servers to fetch some data). Let’s suppose I want to stablish 100 parallel connections, is there any difference in performance or
C Threaded Sockets – tcp with TLS, Can’t get ip/ether packet headers
thanks for reading this question. Have been working for a while on C sockets – specifically c threaded tcp sockets with tls. Using the Openssl API. I have been facing an issue for some time now where I can get the source IP and Port – e.g printf(“Connection: %s:%dn”,inet_ntoa(d->addr.sin_addr), ntohs(d->addr.sin_port));. The problem is that I need all the data –
Units of tx_queue & rx_queue in /proc/net/tcp
On a Linux 2.6.32, i’m looking at /proc/net/tcp and wondering what is the unit of tx_queue and rx_queue. I can’t find this information about receive-queue and transmit-queue in https://www.kernel.org/doc/Documentation/networking/proc_net_tcp.txt Nor in man 5 proc which shows only: The “tx_queue” and “rx_queue” are the outgoing and incoming data queue in terms of kernel memory usage. Is it bytes? or number of
Receive (recv) full request (e.g. curl HTTP)
How should this be done? I want to receive a (rather long) HTTP request and cannot get this to work. The problem: Without flags, recv does not read the whole message. I guess this is normal behavior. From what I understand using the MSG_WAITALL flag causes it to block until everything is received. However, in that case the call blocks
Send and receive Hex String from linux Server C#
I’m developing an developing a little software in c# that connect to a Linux server. the software send a HEX String and receive a HEX String Back. here is my code an example of a string is 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x34 0x03 0x30 0x30 0x30 and the response is this 30 30 30 30 30 30
TCP client cannot connect to TCP server
I have configured a Raspberry Pi to be client, and my personal computer to be TCP server, and trying to connect to server via an ethernet cable. On my personal computer I use Comm Operator and select port “1234”. Raspberry Pi (TCP client) has following setup: Raspberry Pi (TCP client) has the following script to connect: And frankly, it get
Read system call taking forever on Linux
I’m writing a TCP server application in c++. I’m trying to read a line one char at a time from a socket, but the read() system call never returns. And here is the read_from_conn() function Answer The problem is that connfd wasn’t initialized.