Client Server socket behavior on XP different for 127.0.0.1

From: Tim (nospam4274_at_aol.com)
Date: 08/31/04


Date: 31 Aug 2004 10:36:10 -0700

I have two java applications, one a client, the other a server.

The cient connects to the server and then they start transmitting data
back and forth.

If I run the server on Lunix/Unix, connecting via a remote client is
not a problem. However, if I am running the server on Windows XP, it
appears that the first string sent from the server to the client that
is not terminated with a \n causes both the client and the server to
Exception out on their respective sockets. This takes several minutes
and actually hoses network access on the XP mashine, requiring a
reboot to regain net access.

If I start the client up on the same machine as the server (still
using XP) and connect via 127.0.01 instead of the actual IP address,
evertyhing works just fine.

I have checked to ensure that there is no firewalling going on, and
this behaviour has been observed on more than one XP machine.

Any help would be appreciated.

Thanks,
Tim

Client connects rather simply.

sckConnection = new Sockect(address, port);
stmOut = new DataOutputStream(sckConnection.getOutputStream();
stmIn = new BufferedReader(new
InputStreamReader(sckConnection.getInputStream()));

stmOut.writeBytes("data\n");

Server also uses DataOutputStream and BufferedReader.
Server sends commands like the following:
stmOut.writeBytes(""+(char)3+"client message\n");
stmOut.writeBytes(""+(char)14);

I get 3 messages of the first type sent to the client (along with
responses sent back to the server) but the 14 doesn't seem to make it.

Client does the following to process input:
while (incoming != -1)
{
    incoming = stmIn.read();
     switch (incoming)
     {
         case 3:
             addText(stmIn.readLine()+"\n");
         case 14:
             blnLoaded = true;
     }
}



Relevant Pages

  • Re: What doesnt lend itself to OO?
    ... >> proxy and instructs the server to constuct the real object. ... rather than client code. ... If 'clock' is instantiated in the server, ... > for the server interface at the OOA level. ...
    (comp.object)
  • This is going straight to the pool room
    ... or not the client has privilege to do what they're trying to do, ... The server environment is this: ... 3GL User action Routines that Tier3 will execute on your behalf during the ... Routine Name: USER_INIT ...
    (comp.os.vms)
  • [Full-Disclosure] R: Full-Disclosure Digest, Vol 3, Issue 42
    ... Full-Disclosure Digest, Vol 3, Issue 42 ... SD Server 4.0.70 Directory Traversal Bug ... Arkeia Network Backup Client Remote Access ...
    (Full-Disclosure)
  • Re: What doesnt lend itself to OO?
    ... > rather than client code. ... no way to do that without also touching the object with clock semantics ... will not encapsulate both clock semantics and network semantics. ... The server can do whatever it wants ...
    (comp.object)
  • RE: Fax monitor incoming + outgoing calls?
    ... problem between the client computer and the SBS server. ... Client is using the internal IP address of the SBS server as the ... To the folder redirection GPO issue: ...
    (microsoft.public.windows.server.sbs)