🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: be.comp.programming
Article #4745

Re: Socket probleem in c++

#4745
From: Harbinger of Doom
Date: Thu, 10 Jul 2003 12:33
26 lines
2475 bytes
>
> Je kan ook non-blocking IO gebruiken op sockets. Uit 'man 7 socket':
> "It is possible to do non-blocking IO on sockets by setting the
> O_NONBLOCK flag on a socket file descriptor using fcntl(2).  Then all
> operations that would  block will  (usually)  return  with EAGAIN
> (operation should be retried later); connect(2) will return EINPROGRESS
> error.  The user can then wait for various events via poll(2) or
> select(2)." (en dan volgt er een lijstje van I/O events).
>

Dit leek mij ook een heel goede oplossing, maar ze blijkt niet
zo goed te werken.
gelijk waar ik probeer te connecteren krijg ik een error 10035:
"operation would block"
zelfs als ik mijn eigen pc probeer te connecteren.
ik zet bvb een klein ftp-servertje op:
ik run mijn programma op 127.0.0.1 poort 21
resultaat: --> operation would block
daarna probeer ik: telnet localhost 21
resultaat --> geen probleem, ik krijg direct de login.
blijkbaar is dit toch niet de perfecte methode!
toch bedankt!!

--
Harbinger of Doom
Technical Details
Message-ID: <g2dPa.18832$2%.1852199038@hebe.telenet-ops.be>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.vmunix.org!aotearoa.belnet.be!news.belnet.be!ossa.telenet-ops.be!hebe.telenet-ops.be.POSTED!not-for-mail
References: <XQEOa.7874$W94.1297123504@hestia.telenet-ops.be> <3f0bdb8d$0$6526$afc38c87@sisyphus.news.be.easynet.net> <knSOa.8810$V24.1491035148@hestia.telenet-ops.be> <3f0bf791$0$6527$afc38c87@sisyphus.news.be.easynet.net> <CVSOa.8861$zX4.1494718603@hestia.telenet-ops.be> <3f0c0d16$0$295$ba620e4c@reader0.news.skynet.be> <P91Pa.9707$0h2.1681258747@hestia.telenet-ops.be> <1c8Pa.13606$7h.14238@afrodite.telenet-ops.be>

Show Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII-7-bit
X-Google-Thread: fcea4,63379b935ce3281f
X-Google-Attributes: gidfcea4,public
X-Google-ArrivalTime: 2003-07-10 05:39:48 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.vmunix.org!aotearoa.belnet.be!news.belnet.be!ossa.telenet-ops.be!hebe.telenet-ops.be.POSTED!not-for-mail
From: "Harbinger of Doom" <slavearc@pandora.be>
Newsgroups: be.comp.programming
References: <XQEOa.7874$W94.1297123504@hestia.telenet-ops.be> <3f0bdb8d$0$6526$afc38c87@sisyphus.news.be.easynet.net> <knSOa.8810$V24.1491035148@hestia.telenet-ops.be> <3f0bf791$0$6527$afc38c87@sisyphus.news.be.easynet.net> <CVSOa.8861$zX4.1494718603@hestia.telenet-ops.be> <3f0c0d16$0$295$ba620e4c@reader0.news.skynet.be> <P91Pa.9707$0h2.1681258747@hestia.telenet-ops.be> <1c8Pa.13606$7h.14238@afrodite.telenet-ops.be>
Subject: Re: Socket probleem in c++
Lines: 28
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Message-ID: <g2dPa.18832$2%.1852199038@hebe.telenet-ops.be>
Date: Thu, 10 Jul 2003 12:33:16 GMT
NNTP-Posting-Host: 81.82.177.134
X-Complaints-To: abuse@telenet.be
X-Trace: hebe.telenet-ops.be 1057840396 81.82.177.134 (Thu, 10 Jul 2003 14:33:16 CEST)
NNTP-Posting-Date: Thu, 10 Jul 2003 14:33:16 CEST
Organization: Telenet Internet