Skip to content

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 des…

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, …

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_qu…

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…

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 foll…

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.