🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #2574

Strange event using TServerSocket / TClientSocket

#2574
From: Alex Liu
Date: Tue, 28 Mar 2006 11:02
46 lines
3055 bytes
I am not sure if this is the right place for my question. Pls help/forgive 
me if i post it wrong.

i have two server side applications, A and B, which use TServerSocket in 
blocking mode for communicating with clients. The server socket threads will 
perform both read and write operations. In my case the two servers and just 
sending heartbeat only.

A client application connects to the 2 servers via Intranet (in office). 
This case all are working fine.

Now the whole system is put to a higher explosure level by setting up of 
VPN. Home users first connects to Internet, then connects to the office by 
NetScreen (a H/W + S/W 3rd party package) which provides SSL encryption over 
the connection. After VPN has established the user is able to run my client 
application.

However, server A, under this situation, will crash (just simply 
disappeared) while B still works fine.
The time of crash after client has connected varies from serveral minutes to 
an hour.

I added logs in A and found that there seems to be a disconnection (maybe 
because of Internet connection) so the client should be disconnected from A 
before crash. And, AFTER 20 SECONDS, another disconnection event occur which 
has no identity. This is the last log i got before crash.
The log i applied is simply adding log message to log file recording 
incoming IP and socket handle which is recorded in dtor() of the socket 
thread. The result shows that the IP is empty and no socket handle. This 
means no ctor() is called beforehand. I dont know why an extra disconnection 
is taking place.

sample log:
15:00:00.000 disconnect IP=123.123.123.1 socket handle=222
.... // other log
15:00:20.213 disconnect IP= socket handle=                // ???

an extra info but i dont know whether it helps:
My user found that when another Intranet user is connecting and turned the 
machine (MS Window) to sleep mode, the crash will take place otherwise there 
is no problem. Technically speaking I think there should be no relation but 
it really seems so.

I am not sure if i provide enough information or ...... I dont know.

Please kindly advice.
Technical Details
Message-ID: <4429183e$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,acb2b1ff7e8b813c,start
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Alex Liu" <alexliu@hket.com>
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: Strange event using TServerSocket / TClientSocket
Date: Tue, 28 Mar 2006 19:02:49 +0800
Lines: 48
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 218.189.206.62
Message-ID: <4429183e$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1143543870 218.189.206.62 (28 Mar 2006 03:04:30 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail