Downloading via FTP and loading images in a NSTableView
Downloading via FTP and loading images in a NSTableView
- Subject: Downloading via FTP and loading images in a NSTableView
- From: "Valentin Dan" <email@hidden>
- Date: Wed, 19 Mar 2008 09:50:30 -0400
- Thread-topic: Downloading via FTP and loading images in a NSTableView
Hi,
I'd like to know how can I get a file from a server that requires user & password ? What classes should I look at ?
Also, is it possible to load an image in a NSTableView cell ?
And to sum up both questions, can an image be loaded from a server directly in a NSTableView, without saving it on the disk (knowing that the server will ask for credentials ...) ?
Thanks !
PS: Thanks for the NSSocketPort info ... that class just appeared to be exactly what I needed - but one sholdn't judge by appearances :) -
___________________________________________________________________
Valentin Dan, Software Developer Direct: +1 905 886 1833 ext.3047
Email: email@hidden Office: +40 356-710158
Masstech Group Inc. Fax: +40 256-220912
http://www.masstechgroup.com
THIS MESSAGE IS INTENDED ONLY FOR THE ADDRESSEE. IT MAY CONTAIN PRIVILEGED OR CONFIDENTIAL INFORMATION.ANY UNAUTHORIZED DISCLOSURE IS STRICTLY PROHIBITED.IF YOU HAVE RECEIVED THIS MESSAGE IN ERROR, PLEASE NOTIFY US IMMEDIATELY SO THAT WE MAY CORRECT THE RECORDS. PLEASE THEN DELETE THE ORIGINAL MESSAGE. THANK YOU.
-----Original Message-----
From: Andrew Farmer [mailto:email@hidden]
Sent: 19 martie 2008 12:42
To: Valentin Dan
Cc: email@hidden; Dan Tascau
Subject: Re: Network communication with NSFileHandle & NSSocketPort
Importance: High
On 19 Mar 08, at 02:58, Valentin Dan wrote:
> unsigned short serverPort = 9000;
>
> NSString * serverAddress = @“192.1.2.1”;
>
> NSSocketPort * socketPort = [[NSSocketPort alloc]
> initRemoteWithTCPPort:serverPort host:serverAddress];
NSSocketPort is part of the Distributed Objects API - despite the
name, it's not a general-purpose socket class. Unless this is
specifically what you're trying to do, you'll need to initialize a
socket FD yourself using BSD calls, then create a NSFileHandle from
that using initWithFileDescriptor:.
There are a couple of alternate approaches. There's CFSocket if you
don't mind working with CoreFoundation. If you want a set of Cocoa
classes, there's NetSocket, among others.
No virus found in this incoming message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.21.7/1334 - Release Date: 18.03.2008 20:52
No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.21.7/1334 - Release Date: 18.03.2008 20:52
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden