tcp

PostgreSQL UNIX domain sockets vs TCP sockets

I wonder if the UNIX domain socket connections with postgresql are faster then tcp connections from localhost in high concurrency rate and if it does, by how much? ...

I need a TCP option (ioctl) to send data immediately.

I've got an unusual situation: I'm using a Linux system in an embedded situation (Intel box, currently using a 2.6.20 kernel.) which has to communicate with an embedded system that has a partially broken TCP implementation. As near as I can tell right now they expect each message from us to come in a separate Ethernet frame! They seem to...

TCP is it possible to achieve higher transfer rate with multiple connections?

Is it possible to achieve better data transfer rate with multiple parallel TCP connections in high-latency environment (public internet with large geographical distance assuming no traffic shaping per connection or stuff like that) or can TCP utilize the whole bandwidth with a single connection? Is TCP sending data as fast as it cans ...

Why does UDP have a length field in the header and TCP does not?

Why does UDP have a length field in the header and TCP does not? I am guessing that the length of the segment in TCP is inferred from the IP header but one should be able to do the same for a UDP datagram ...

Detecting TCP Client Disconnect

If I'm running a simple server and have accept()ed a connection from a client, what is the best way to tell when the client has disconnected? Normally, the client in this case I supposed to send a close command, but what if it DCs manually? How can I tell or handle this? ...

WCF Duplex Service and TCP Port Exhaustion

I am trying to wrap my head around this. I am making a business specific messaging application, it is going to connect between 5000 and 10,000 machines back to our datacenter via WCF (no vpns, all over the net). It is mainly for alerts and I need to be able to send message direclty to specific clients, and WCF allows me to do all of thi...

LDAP socket keep-alive

We are using OpenLDAP client library to conect to an LDAP server. The problem is that if there is no activity for some time, server (or firewall in the middle) drops TCP connection. Our current implementation of "keep-alive" just does search for baseDN from time to time - any better ideas ? ...

Running a function periodically in twisted protocol

I am looking for a way to periodically send some data over all clients connected to a TCP port. I am looking at twisted python and I am aware of reactor.callLater. But how do I use it to send some data to all connected clients periodically ? The data sending logic is in Protocol class and it is instantiated by the reactor as needed. I do...

Chunked Encoding Implementation in .NET (or at least pseudo code)

I wrote a raw TCP client for HTTP/HTTPS requests, however I'm having problems with chunked encoding responses. HTTP/1.1 is requirement therefore I should support it. Raw TCP is a business requirement that I need to keep, therefore I can't switch to .NET HTTPWebRequest/HTTPWebResponse However if there is way to convert a RAW HTTP Request...

Converting Raw HTTP Request into HTTPWebRequest Object

In .NET is it possible to convert a raw HTTP request to HTTPWebRequest object? I'm sure .NET internally doing it. Any idea which part of the .NET is actually handling this? Can I call it or is there any external library which allows raw HTTP connections? ...

Problems receiving data over a TCP client socket in 'C'

I'm trying to make a TCP Client program in C where the client will start up, connect to a server. Then it will send a little information and then just listen to what it receives and react accordingly. The part that I'm having trouble with is the continuous listening. Here is what I have ... while (1) { numbytes = recv(sockfd, buf, ...

Self Hosting TCP based WCF service inside a Windows Service

I am trying to Self host a wcf tcp based service inside a windows service. The windows service is a wrapper which does mainly two jobs, 1> hosting a tcp based wcf service, note that the windows service is a simple service 2> running other windows services under it I am able to run the windows service but when trying to connect to it usi...

What is the best way to forward all requests on a certain port to another machine on the network?

I have two dedicated servers and no hardware firewall. I'd like to forward all requests that come into the primary server on port 1008 to be fulfilled by another dedicated server on the same network. I know I need to set up some kind of TCP proxy, but I first heard of IPTables yesterday. Any quick tips? ...

Setting TIME_WAIT TCP

We're trying to tune an application that accepts messages via TCP and also uses TCP for some of it's internal messaging. While load testing, we noticed that response time degrades significantly (and then stops altogether) as more simultaneous requests are made to the system. During this time, we see a lot of TCP connections in TIME_WA...

Can the "internet" reroute connection requests between remote servers when one is down?

I operate an OLTP system that allows SSL connections over the internet at multiple sites. I would like to find an effective solution to how to transparently and automatically reroute transaction connections when one site is down. Bonus points for considering the site down when it is not actually unreachable or unable to connect but jus...

Determining the TCP port number to which client got bound.

Hi, I create a TCP socket without bothering about the port number to bind to [socket.sin_port = 0]. However later on if I want to print the port number of client how do I do that? The client C application (on Linux) creates many clients which get connected to server. To debug issues I capture the traffic on ethereal. I thought of printi...

Is TCP Keepalive the only mechanism to determine a broken link?

I recently ran into a issue where intermediate link betweeen a TCP server and client was down. The client has the requirement of connecting to a secondary server if the primary server is down. When the primary server is bought down (Ex ..by doing ^C on the terminal), there is TCP shutdown sequence that gets through and client sucessfully...

What is the Significance of Pseudo Header used in UDP/TCP

I just wanted to know why Pseudo header is preceded to UDP. Why Pseudo header is used. whats the logic behind it. ...

What is the state of a TCP socket after remote closed?

Hello, Say I have accepted() a connection to my server (that runs on a Solaris) and the client has closed the connection. What is the state of the socket (in netstat categories) of the socket on the server side before I close() it on the server side? Is it BOUND? ...

TCP communication on Vista

Hi all, I have a very simple app I'm trying to get to run under TCP using WCF 3.5 on Vista Enterpise. The error I'm getting when trying to hit a WCF service at http://localhost:8080 (or any other port not reserved by http) is: TCP error code 10061: No connection could be made because the target machine actively refused it 127.0.0.1:808...