[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using NSSocketPort
From: |
Richard Frith-Macdonald |
Subject: |
Re: Using NSSocketPort |
Date: |
Sun, 16 May 2004 12:04:10 +0100 |
On 16 May 2004, at 11:42, Nicolas SANCHEZ wrote:
Hello,
I want to connect to a server using NSSocketPort.
What is the Class I had to use to read and write on the socket ?
You almost certainly don't want to use NSSocketPort ... that's a class
for Distributed Objects
connections, and I assume that if you meant you wanted to connect to a
distributed objects server you would already know that you use
NSConnection for DO.
Probably you want to connect to a non-GNUstep server process which
communicates via TCP/IP. For that you should be using the NSFileHandle
class.
GNUstep has +fileHandleAsClientAtAddress:service:protocol: to establish
such a connection.
eg.
To connect to a network news server you might do -
myHandle = [NSFileHandle fileHandleAsClientAtAddress: @"myhost@mydomain"
service: @"nntp" protocol: "tcp"];
See
http://www.gnustep.org/resources/documentation/Developer/Base/
Reference/NSFileHandle.html
- Using NSSocketPort, Nicolas SANCHEZ, 2004/05/16
- Re: Using NSSocketPort,
Richard Frith-Macdonald <=