Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.os2.programmer.porting > #68 > unrolled thread

SHUT_RDWR

Started byDave Yeo <dave.r.yeo@gmail.com>
First post2011-06-15 21:37 -0700
Last post2011-06-19 11:25 -0700
Articles 7 — 4 participants

Back to article view | Back to comp.os.os2.programmer.porting


Contents

  SHUT_RDWR Dave Yeo <dave.r.yeo@gmail.com> - 2011-06-15 21:37 -0700
    Re: SHUT_RDWR Mentore <mentore.siesto@libero.it> - 2011-06-16 05:30 -0700
      Re: SHUT_RDWR Paul Smedley <paulDESPAM@DESPAMMsmedley.id.au> - 2011-06-17 19:14 +0930
        Re: SHUT_RDWR Dave Yeo <dave.r.yeo@gmail.com> - 2011-06-18 10:46 -0700
    Re: SHUT_RDWR KO Myung-Hun <komh@chollian.net> - 2011-06-19 19:56 +0900
      Re: SHUT_RDWR KO Myung-Hun <komh@chollian.net> - 2011-06-19 20:14 +0900
        Re: SHUT_RDWR Dave Yeo <dave.r.yeo@gmail.com> - 2011-06-19 11:25 -0700

#68 — SHUT_RDWR

FromDave Yeo <dave.r.yeo@gmail.com>
Date2011-06-15 21:37 -0700
SubjectSHUT_RDWR
Message-ID<itc1a1$6gd$3@speranza.aioe.org>
Anyone have a compatible define for SHUT_RDWR? Closes a full duplex 
connection on a socket. Used like
if (sess->fd != -1) {
         shutdown(sess->fd, SHUT_RDWR);
         close(sess->fd);
         sess->fd = -1;

Dave

[toc] | [next] | [standalone]


#69

FromMentore <mentore.siesto@libero.it>
Date2011-06-16 05:30 -0700
Message-ID<3538cbf2-1215-498d-9e95-025aa88603dc@s9g2000yqm.googlegroups.com>
In reply to#68
On 16 Giu, 06:37, Dave Yeo <dave.r....@gmail.com> wrote:
> Anyone have a compatible define for SHUT_RDWR? Closes a full duplex
> connection on a socket. Used like
> if (sess->fd != -1) {
>          shutdown(sess->fd, SHUT_RDWR);
>          close(sess->fd);
>          sess->fd = -1;
>
> Dave

Hello Dave,

searching around I found some interesting links:

http://www.freepascal.org/docs-html/rtl/sockets/shut_rdwr.html

More important:

http://tomoyo.sourceforge.jp/cgi-bin/lxr/ident?i=SHUT_RDWR

Needless to say, I never ran around this definition... So I don't even
know if my reply will come useful to you.

Mentore

[toc] | [prev] | [next] | [standalone]


#70

FromPaul Smedley <paulDESPAM@DESPAMMsmedley.id.au>
Date2011-06-17 19:14 +0930
Message-ID<4dfb2213$0$11099$c3e8da3@news.astraweb.com>
In reply to#69
Hi Guys,

On 06/16/2011 10:00 PM, Mentore wrote:
> On 16 Giu, 06:37, Dave Yeo<dave.r....@gmail.com>  wrote:
>> Anyone have a compatible define for SHUT_RDWR? Closes a full duplex
>> connection on a socket. Used like
>> if (sess->fd != -1) {
>>           shutdown(sess->fd, SHUT_RDWR);
>>           close(sess->fd);
>>           sess->fd = -1;
>>
>> Dave
>
> Hello Dave,
>
> searching around I found some interesting links:
>
> http://www.freepascal.org/docs-html/rtl/sockets/shut_rdwr.html
>
> More important:
>
> http://tomoyo.sourceforge.jp/cgi-bin/lxr/ident?i=SHUT_RDWR
>
> Needless to say, I never ran around this definition... So I don't even
> know if my reply will come useful to you.

I've used the above and it works ok...

Cheers,

Paul

[toc] | [prev] | [next] | [standalone]


#72

FromDave Yeo <dave.r.yeo@gmail.com>
Date2011-06-18 10:46 -0700
Message-ID<itioa8$lnn$1@speranza.aioe.org>
In reply to#70
Paul Smedley wrote:
> Hi Guys,
>
> On 06/16/2011 10:00 PM, Mentore wrote:
>> On 16 Giu, 06:37, Dave Yeo<dave.r....@gmail.com> wrote:
>>> Anyone have a compatible define for SHUT_RDWR? Closes a full duplex
>>> connection on a socket. Used like
>>> if (sess->fd != -1) {
>>> shutdown(sess->fd, SHUT_RDWR);
>>> close(sess->fd);
>>> sess->fd = -1;
>>>
>>> Dave
>>
>> Hello Dave,
>>
>> searching around I found some interesting links:
>>
>> http://www.freepascal.org/docs-html/rtl/sockets/shut_rdwr.html
>>
>> More important:
>>
>> http://tomoyo.sourceforge.jp/cgi-bin/lxr/ident?i=SHUT_RDWR
>>
>> Needless to say, I never ran around this definition... So I don't even
>> know if my reply will come useful to you.
>
> I've used the above and it works ok...
>
> Cheers,
>
> Paul

Did you use the whole macro? I simply defined it as 2. I was wondering 
if there were any drawbacks to doing so kinda like how on OS/2 a must be 
closed before deleting.
Dave

[toc] | [prev] | [next] | [standalone]


#73

FromKO Myung-Hun <komh@chollian.net>
Date2011-06-19 19:56 +0900
Message-ID<itkkk2$j3s$1@tnews.hananet.net>
In reply to#68
Hi/2.

I'm using the following in VLC ports.

#define SHUT_RDWR  ( SO_RCV_SHUTDOWN | SO_SND_SHUTDOWN )

Dave Yeo wrote:
> Anyone have a compatible define for SHUT_RDWR? Closes a full duplex
> connection on a socket. Used like
> if (sess->fd != -1) {
>         shutdown(sess->fd, SHUT_RDWR);
>         close(sess->fd);
>         sess->fd = -1;

-- 
KO Myung-Hun

Using Mozilla SeaMonkey 2.0.11
Under OS/2 Warp 4 for Korean with FixPak #15
On AMD ThunderBird 1GHz with 512 MB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr

[toc] | [prev] | [next] | [standalone]


#74

FromKO Myung-Hun <komh@chollian.net>
Date2011-06-19 20:14 +0900
Message-ID<itkllp$kbp$1@tnews.hananet.net>
In reply to#73
Hi/2, again. ^^

The previous is wrong codes. Sorry.

Instead, TCP/IP Programming Reference in ToolKit 4.5 says like this.

-----
 The howto parameter sets the condition for shutting down the connection to
socket s. It can be set to one of the following:

     0 - no more data can be received on socket s.
     1 - no more output to be allowed on the socket s.
     2 - no more data can be sent or received on socket s.
-----

KO Myung-Hun wrote:
> Hi/2.
> 
> I'm using the following in VLC ports.
> 
> #define SHUT_RDWR  ( SO_RCV_SHUTDOWN | SO_SND_SHUTDOWN )
> 
> Dave Yeo wrote:
>> Anyone have a compatible define for SHUT_RDWR? Closes a full duplex
>> connection on a socket. Used like
>> if (sess->fd != -1) {
>>         shutdown(sess->fd, SHUT_RDWR);
>>         close(sess->fd);
>>         sess->fd = -1;
> 

-- 
KO Myung-Hun

Using Mozilla SeaMonkey 2.0.11
Under OS/2 Warp 4 for Korean with FixPak #15
On AMD ThunderBird 1GHz with 512 MB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr

[toc] | [prev] | [next] | [standalone]


#79

FromDave Yeo <dave.r.yeo@gmail.com>
Date2011-06-19 11:25 -0700
Message-ID<itleub$v04$2@speranza.aioe.org>
In reply to#74
KO Myung-Hun wrote:
> Hi/2, again. ^^
>
> The previous is wrong codes. Sorry.
>
> Instead, TCP/IP Programming Reference in ToolKit 4.5 says like this.
>
> -----
>   The howto parameter sets the condition for shutting down the connection to
> socket s. It can be set to one of the following:
>
>       0 - no more data can be received on socket s.
>       1 - no more output to be allowed on the socket s.
>       2 - no more data can be sent or received on socket s.

OK, so defining it as 2 is correct.
Thanks
Dave

[toc] | [prev] | [standalone]


Back to top | Article view | comp.os.os2.programmer.porting


csiph-web