• 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
Networking and threading
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Networking and threading


  • Subject: Networking and threading
  • From: Denis Defreyne <email@hidden>
  • Date: Sun, 14 Mar 2004 20:59:52 +0100

Hello list.

I am writing a chat client and that obviously involves writing network code.

However, I'm running into trouble. I first wrote the network code using NSFileHandle's, and connecting to servers using connect(). Since connect() blocks, I had to put the connect() in a separate thread (using pthreads), but that caused more problems, since a running pthread is difficult, if not impossible, to stop.

I switched to NetSocket, which is based on the CoreFoundation CFSocket stuff. But, CFSocketConnectToAddress seems to be buggy; connecting to closed ports apparently makes the socket connected, and immediately after that, disconnected. I guess it's an Apple bug. It's not just a NetSocket issue, it happens with other CFSocket-based frameworks as well.

I'm wanting to try the OmniNetworking framework. This framework does not support async I/O so I'm going to use threads anyway if I use OmniNetworking.

My question is, is OmniNetworking good? Should I use another networking framework? If I have to implement some threading, what thread framework would you recommend?

Regards,

Denis Defreyne

--
mail: email@hidden
web: http://amonre.bedesign.be/
_______________________________________________
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.


  • Follow-Ups:
    • Re: Networking and threading
      • From: Dave Keck <email@hidden>
  • Prev by Date: Re: Writing a non-NSDocument based multiple document window apps
  • Next by Date: Re: Writing a non-NSDocument based multiple document window apps
  • Previous by thread: Re: Accessing NSTimer object added to NSRunLoop object
  • Next by thread: Re: Networking and threading
  • Index(es):
    • Date
    • Thread