Skip to content
Advertisement

Tag: sockets

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:

`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

Raw Sockets in C

1. The linux manual page says about this code. In socket option, if IP_HDRINCL is set, I can make IP header. Am I right? If it’s right, above socket also let me make TCP header, too? Then, if IP_HDRINCL is not set, what means above socket? 2. what means above code comparing to number 1 question’s code? I know IPPROTO_RAW

Detect client is disconnected

I have a simple program that listens to a socket. Everything goes fine except when the connection is lost in while(1) cycle. In this case the program falls into read from socket for many times without result. How can I detect a disconnected client in while(1) cycle? Answer Change: To: Also, your code mishandles the case where the first byte

errno.h socket/connection error classification

I’m using boost::asio on linux to send http request, using almost exactly this code boost asio http I want to catch exceptions and classify them using errno.h error codes to three groups GROUP 1. errors occurred because of local host socket/connection. GROUP 2. errors occurred because of local host or remote host or third party. GROUP 3. errors occurred because

Is libpcap implemented by socket API?

libpcap is used for package capturing. As I understand, it can capture the network packages from all ports. And it can capture the package data in link layer (such as ethernet frame). This looks a little confusing to me, because it seems impossible to intercept all network traffic (from all ports) by just using the socket API in Unix-like system.

Merged Socket->recv with perl on Linux

Sorry for the bad English, it is not my mother tongue. I am new to perl programming and I’m facing a tedious problem for some hours now. I have coded a simple Client-Server using IO::Socket::INET. It works flawlessly on Windows, but is broken on Linux. On Linux, the first recv get both of server’s communication and therefor, the second one

Advertisement