Problem with NSStream newbie question
Problem with NSStream newbie question
- Subject: Problem with NSStream newbie question
- From: "Sebastian Pape" <email@hidden>
- Date: Wed, 20 Feb 2008 16:44:00 +0100
Hi,
I've been working for two days on one problem now. I want to exchange data
with a server using NSStream. Each call is just 10 lines, with a short
answer of 4 lines.
See what I created so far: http://pastebin.org/20409
I have a main class called AtMain.m and a class for doing the work called
AtStream. I create an object of type AtStream and try to open the
NSInputStream and NSOutputStream, which I can do.
But it seems as if my
- (void)stream:(NSStream *)aStream handleEvent:(NSStreamEvent)eventCode {
method in (AtStream.m) is never triggered by an event. How can I make my
streams stay open and wait to be ready and then write something in there and
receive an answer? It seems as if there wasn't any connection from my little
tool to the server. (tcpdump shows no output). Do I have to init the object
in another way to put it into a kind of "waiting" state?
Maybe I am doing everything wrong right now, but I'm a little bit tired of
my examples from "Learning Cocoa with Objective-C" and wanted to start off
with some really easy project, what I thought this would be.
It's all here. Would be really nice if anybody of you could have a look at
it. http://pastebin.org/20409
Thanks
Sebastian.
_______________________________________________
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