• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cocoa and Telnet
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa and Telnet


  • Subject: Re: Cocoa and Telnet
  • From: Mark Dalrymple <email@hidden>
  • Date: Thu, 24 Apr 2003 09:53:27 -0400

Hi David,

> I need to connect to a Telnet session which streams data to me.

Telnet fundamentally just opens a TCP connection and then reads and writes bytes through it. You can do the same thing with your networking APIs of choice (Berkeley sockets, SmallSockets, OmniNetworking, and there's probably some CF* stuff I'm forgetting about).

For instance you could use Berkeley sockets to create the connection, then wrap an NSFileHandle around the socket file descriptor and use that do to reading and writing. I threw together a quick sample that uses sockets and NSFileHandle to write an HTTP request and read the result, but it could be extended to read for username and password prompts and write back the appropriate data. The sample is at http://borkware.com/quickies/one?topic=Samples

Cheers,
++Mark Dalrymple, email@hidden
http://borkware.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Cocoa and Telnet (From: David Blanton <email@hidden>)

  • Prev by Date: Re: Cocoa and Telnet
  • Next by Date: Re: Cocoa and Telnet
  • Previous by thread: Re: Cocoa and Telnet
  • Next by thread: Re: Cocoa and Telnet
  • Index(es):
    • Date
    • Thread