Skip to content

Tag: tcp

can I reuse the socket when update SSL certificate?

The old SSL certificate has expired and I want to renew the SSL certificate. However, the server already has established multiple links with other clients. So, can I just bind the old sockets to the new ssl, which means I don’t need to disconnect the old base tcp links? Answer Existing TLS connections don’t need to get updated with a

Parallel TCP connection using threads

I am trying to build a system that opens parallel TCP sockets using threads. My threads are triggered using message queue IPC , thus every time a packet arrive to the message queue a thread “wakes up” , open TCP connection with remote server and send the packet. My problem is that in Wireshark , I can see the the

Is a connection to localhost copied over memory or disk?

AFAIK, there exist two methods for IPC over sockets. Unix sockets and TCP/IP sockets. UNIX domain sockets know that they’re executing on the same system, so they can avoid some checks and operations (like routing); which makes them faster and lighter than IP sockets. They also transfer the packets over the file system, meaning disk access is a natural part

TCP echo server doesn’t accept client

I’m trying to make an echo client server in C. The problem is, when I start the server and run the client code, in client shell it says “Connected” but in server shell it still says “Waiting for connection”. (Server doesn’t say “accept failed”. It says “Waiting for connection” forever). I think server is not accepting client and therefore if

How can I stop the while?

I have A TCP Server-Client where I enter a number with the number of times that I want to send the word to the server. So I send correctly because I print the information on a loop(in client) but in the server shows infinitely because I put while(1) but if I don’t use just print it one time. I don’t

What happens to TCP socket when IP address changes?

Is there any error on a socket when writing to it after IP address change? In my I’m using TCP socket, both read/write (non-passive), no TCP or application keep-alive. To inspect this case I use socat to connect to a simple echo server on my local network. The connection is OK until I change the client IP address on my