Networking Forums  

Go Back   Networking Forums > Networking Newsgroups > Linux Networking

Problem with TCP connection over loopback interface

Reply
 
Thread Tools Display Modes
  #1  
Old 05-17-2005, 12:33 PM
Default Problem with TCP connection over loopback interface



Hi,

I maintain a library at work which functions like RPC allowing function
call abstraction across a network. The user simply calls the function,
and the action takes place on a remote processor, or perhaps on the
same processor in a different process.

The network connection between the client and server is TCP/IP. The
client either connects over the loopback interface, or a HDLC/PPP
interface to the other processor.

The primary issue is that when it is a loopback connection, it snaps
when there is a LOT of traffic. This is really painful and the
application finds it nearly impossible to handle.

The other problem I've observed with the TCP connection over the
loopback is as follows.
I use non-blocking sockets with a select loop.
The server-side may not be up.
The client calls connect.
The connect should fail with the timeout and show up in the select, or
get connected.
If it failed, I cleanup, close the socket, open a new socket and try to
connect again.

Now, since I'm using a non-blocking socket call (connect), I should
ALWAYS get either a succesful connect, or EINPROGRESS (correct me if
I'm wrong). However, sometimes I get a connect failure other than
EINPROGRESS.
The problems are observed primarily in a 2.2 kernel. I tried to look
this up but I've not been able to find anyone with a similar issue.

I'd like to know if anyone can help me with this, or if the better
solution is to go with Unix sockets for the loopback special case.

My suspicion is that there is some 'optimization' for the loopback
connection that I'm hitting against.


Thanks,
Prasanna



Prasanna Krishnamoorthy
Reply With Quote
Reply

Tags
connection, interface, loopback, problem, tcp

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 07:32 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.