Networking
Networking
- Subject: Networking
- From: Christopher J Kemsley <email@hidden>
- Date: Mon, 13 Jul 2009 19:20:09 -0700
I'm not sure how to begin this, so I'll start off with what I have.
What I have:
Device A and Device B.
Device A is connected to the internet (at address The Address, and has
port The Port routed to it for instance)
Device B is also connected to the internet, but is not on the same
local network as Device A.
What I want:
A custom written server on Device A that listens on The Port for a
device to connect. It expects to be sent an NSData object and will be
expected to return another NSData object.
Device B should be able to, through a blocking method (or background
in a thread), get an NSData object returned by Device A after giving
it another NSData object. (for example, Device B asks Device A "Do I
have messages?" and gets "Yes, you have two" in response)
What I've tried and/or cannot use:
I cannot use Distributed Objects. Although this would make this
incredibly easy, Device B is an iPhone and does not support
distributed objects.
I've tried setting up an HTTP server using NSSocketPort and
NSFileHandle's "acceptConnectionInBackgroundAndNotify" method;
however, I seem to be unable to get the client (regardless of
platform) to be able to send an arbitrary data package to it and get
one in return.
So, my question is, does anybody know of any other ways - or good
beginner's guides - to networking in situations like this?
_______________________________________________
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