gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSFileHandle -socketProtocol


From: Richard Frith-Macdonald
Subject: Re: NSFileHandle -socketProtocol
Date: Tue, 12 Nov 2002 18:45:26 +0000

On Tuesday, November 12, 2002, at 06:15  pm, Chris B. Vetter wrote:

On 2002-11-11 23:40:30 -0800 Richard Frith-Macdonald <address@hidden> wrote:
On Monday, November 11, 2002, at 11:28  pm, Chris B. Vetter wrote:
please, someone enlighten me: why is it defined as
    - (NSString *) socketProtocol;
and returns nil? Shouldn't it be an int?
It returns the protocol name (eg. "ssl" or "tcp") as documented.

So the actual implementation should be done by subclasses. ?!

The problem here is, SSL is no _socket_.
SSL is between PF_INET, SOCK_STREAM and your application.

Hopefully in future it might return other protocol names like "unix", "socks"

Huh? unix? socks? unix domain sockets? NFS?

WTF???

Are we talking about different interpretations of the terms "socket" and
"protocol" here?

etc. There is no int value it could return.

Read RFC790 and RFC1700 ... or do a

 grep -R IPPROTO /usr/include/*

It would make more sense for -socketProtocol to return something like
IPPROTO_TCP instead of @"tdp".

Unless of course your definition of "socket" differs from everybody else's.

The names of the 'socket...' methods should probably be changed ... they are not meant to imply unix/bsd kernel sockets, but a fairly abstract notion of a
communications link to another process.
They could be implemented over bsd sockets, unix domain sockets, sysv streams
sysv ipc message queues, named pipes, etc.
The 'protocol' is supposed to be a fairly arbitrary identifier for the mechanism
actually used.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]