🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: 'could not bind socket' error

#737
From: George Tokas
Date: Fri, 23 Nov 2007 17:50
22 lines
2509 bytes
Sorry for the interrupt.
Win2K and above with multiple accounts and fast switching:
1. We have an application using a Mutex for run just once...
2. Running the application under a user account.
3. Switching user and trying to run again the application.

The application will start again and we will have 2 instances as proccesses 
globaly...

Lets say the one has a TServer socket listening (active) in a port...
By switching user and trying to run the app again we will have THAT 
SYMPTOM...
There is an article by myself at http://bcbjournal.com, in this month's 
issue I hope, using that for a global single instance of an application in a 
windows PC...
Usually a crashed application with a TServer socket active has allready 
released the port, if not after the first attempt and *crash* or catching of 
the exception raised the next time will work properly....
A simple way to find out if a port is in use is to try to connect a TClient 
socket to that port using "localhost" as the host name...

George Tokas. 
Technical Details
Message-ID: <fi73sv$6it$1@newsmaster.pub.dc.hol.net>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!194.30.220.196.MISMATCH!news.hol.gr!not-for-mail
References: <47431d9f$1@newsgroups.borland.com> <474342ce@newsgroups.borland.com> <47434723$1@newsgroups.borland.com> <474358f3@newsgroups.borland.com> <47436c88$1@newsgroups.borland.com> <474377e3$1@newsgroups.borland.com> <474384f3$1@newsgroups.borland.com> <4743c58d$1@newsgroups.borland.com> <4743d916$1@newsgroups.borland.com> <474465f6$1@newsgroups.borland.com> <47446f97$1@newsgroups.borland.com> <47449cad$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,128d041863311899
X-Google-Attributes: gid11508e,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!194.30.220.196.MISMATCH!news.hol.gr!not-for-mail
From: "George Tokas" <gtokas2@hol.gr>
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: Re: 'could not bind socket' error
Date: Fri, 23 Nov 2007 19:50:19 +0200
Organization: Hellas On Line
Lines: 24
Message-ID: <fi73sv$6it$1@newsmaster.pub.dc.hol.net>
References: <47431d9f$1@newsgroups.borland.com> <474342ce@newsgroups.borland.com> <47434723$1@newsgroups.borland.com> <474358f3@newsgroups.borland.com> <47436c88$1@newsgroups.borland.com> <474377e3$1@newsgroups.borland.com> <474384f3$1@newsgroups.borland.com> <4743c58d$1@newsgroups.borland.com> <4743d916$1@newsgroups.borland.com> <474465f6$1@newsgroups.borland.com> <47446f97$1@newsgroups.borland.com> <47449cad$1@newsgroups.borland.com>
NNTP-Posting-Host: ath-nce02.hol.gr
X-Trace: newsmaster.pub.dc.hol.net 1195840223 6749 62.38.4.229 (23 Nov 2007 17:50:23 GMT)
X-Complaints-To: abuse@hol.gr
NNTP-Posting-Date: Fri, 23 Nov 2007 17:50:23 +0000 (UTC)
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; Response