Objective-C Bonjour / TCP Stack

I was wondering if anyone knows about the integrated Objective-C Bonjour / TCP stack, which will let me forget about socket management, broadcast services, etc., and instead let me just host the service and / or get a list of existing services and connect to one. Then just keep sending messages to either specific clients from the server side or to the server from the client.

I assume that any messages received and / or discovered services will be sent to me through the delegation methods, and the rest of the dirty work to the stack.

I understand that this is not so difficult to implement, and I already have some of them, but it would be much more reasonable to use a mature structure.

Extra points if compatible with iPhone.

+3
source share
6 answers

I would say do it yourself.

If you don’t think that the requirements that you indicated in the question will change, then a simple but well-tested implementation of the socket server + netservices and the shell for socket streams + will be just fine - you may not even need a framework as such.

I implemented something similar for tutorial and used it in several different projects. You look at about 200 lines of code for the TCP socket server and about 300 lines for the Connection class (with delegates and all that).

+4
source

, GameKit Framework, iPhone SDK. GameKit, GKSession, , . , Apple - .

+3

Apple WiTap iPhone. , , . iPhone Dev Center.

+1

NSNetServices, iPhone OSX? / Bonjour.

, , , , ( ..) , , .

, - - , HTTP, , . - HTTP- . .

0

ConnectionKit, FTP, HTTP, SFTP, WebDAV Amazon S3. iPhone , Cocoa , , . , , , .

0

How about using AsyncSocket . I have not used it personally, but it seems to be the perfect choice for you.

0
source

Source: https://habr.com/ru/post/1714047/


All Articles