I’ve been reading about TCP_FASTOPEN in Linux and I can’t figure out per what is cookie saved. If one program on my Linux server connects using tcp fast open, does other program that connects to same server uses previous ones cookie for fast open? Or only sockets from same program can use each other cookies? Answer Few years ago the
Tag: tcp
Linux: Recv randomly returns zero
I wrote a simple TCP network library with epoll for linux. In one of my tests, I want to test the throughput of the library. I send 2000000 msgs of 500 bytes. The binded socket randomly returns zero on a recv after 800000 or more msgs have been received. Other times, all messages are received. What would cause this to
Connection refused – tcp socket in linux [closed]
Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 7 years ago. Improve this question Ok, first how to run my program: my server How to compile? server:
Get struct socket*, struct sock * from socket descriptor in a C program on Linux
I’m working on a C program on Linux (unprivileged). Is it possible to get a reference to struct socket or struct sock from the socket descriptor? Thank you. Answer If you’re working in user mode (eg. not kernel mode), you cannot directly manipulate kernel structures (including struct sock). If you do need access to these kernel structures, you will need
`boost::asio` `async_resolve` hangs on Linux, what may be a reason?
I write complex TCP/IP client application that generates a lot of outgoing TCP connections. I try to use boost::asio as portable TCP/IP networking implementation in C++. I found following issue. See the code: This code runs background thread to execute io_service::run method. It is supposed that we’ll have multiple sockets that use this io_service to perform asyncrhonous operations. On Windows
Android 6: file /proc/sys/net/ipv4/tcp_fastopen
Is there any kind stackoverflow member who can check the value in the file /proc/sys/net/ipv4/tcp_fastopen on an Android 6 device? Thank you! Answer Here is what I get on an Android 6.0.1 (MMB29K) Nexus 6:
Attempting to send TCP SYN packet with data and RST with data, but raw data field disappears in transit. Why?
I’m attempting to craft a raw TCP packet to send over Ether in a raw socket on a linux client and server. The special part of the TCP packet is that I’m attempting to use the raw data field of the TCP SYN packet and RST packet to send data back and forth (for a proof of concept about an
TCP/IP connection to the host localhost port 1487 has failed – Linux 32 bit
I try to connect to a mySql localhost database. I checked the port 1487 and is open for connection. Many solutions suggest to open SQL Server Configuration Manager, but there is no such thing in Ubuntu 14.04. I tried to install Microsoft ODBC Driver 11 for SQL Server on Linux, but it’s only for 64 bit systems. I use eclipse
Bad File Descriptor on recv from TCP socket
I’ve got a trouble and can’t google out solution, so I hope you’ll be able to help me. There is a client-server application, something like text chat. Server accepts client’s connection, makes new socket for client and sends socket descriptor to it’s child process, that broadcasts received messages to all connected clients. server.c (error handling and tests are cuted out)
Abuse cURL to communicate with Redis
I want to send a PING to Redis to check if the connection is working, now I could just install redis-cli, but I don’t want to and curl is already there. So how can I abuse curl to do that? Basically I need to turn off what’s send here: I was able to get rid of the User-Agent altogether by