开发者

Connecting to server using bonjour in Objective-C

I am relatively new to iphone development. I have looked through the documentation and cannot really find an answer to this problem.

I have a server which I have created and know the ip address and the port it is using. I am now trying to connect to this using an iphone application I am creating. Through the documentation there are many example 开发者_开发知识库where it connects via an ID (such as the witap example) however there is none where it directly accesses a previously created server.

Would anyone be able to point me in the direction of an example that uses this, give me some information or even inform me of another way around doing this? It would be much appreciated. Thanks.


Bonjour is a technology to detect servers in your local network. If you already know it, as you seem to because you know the IP address, you can connect to it using the usual techniques.

It depends on your server, is it a HTTP server? There are some Cocoa classes that might help you.

If it's a custom made server you might consider CFStream or raw sockets.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜