🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Breaking out of a blocking call

#4328
From: Lynn Morrison
Date: Thu, 10 Feb 2005 12:27
20 lines
1684 bytes
Hi, I am having problems with a socket giving me an access violation. I am
using the API to do my own socket code in blocking mode. When, for example,
my socket(used in an ftp app) has a reply from the server such as "Opening
data connection for xxx.xxx.xxx.xxx on port xxxx" and because of a firewall
or one of those proxy style routers, I get access violations when trying to
shut down the socket...

if(AbortPressed) {
    int retval = shutdown(DataSockHandle,SD_BOTH);
     return retval;
}

this returns WSAEINPROGRESS all the time, but how do I FORCE it to shutdown?
I tried just looping while I wait for it to return, but that sometimes is
infinitely on some servers... I tried WSACancelBlockingCall, but with
winsock 2 that function is obsolete.

What other options do I have?

Lynn
Technical Details
Message-ID: <420b53bb$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,4dbc2d4a94baf63e,start
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Lynn Morrison" <Cranky@__whisp.com>
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: Breaking out of a blocking call
Date: Thu, 10 Feb 2005 07:27:45 -0500
Lines: 26
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 209.202.121.67
Message-ID: <420b53bb$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1108038587 209.202.121.67 (10 Feb 2005 04:29:47 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail