Re: Networking framework crash

2015-02-05 Thread Roland King
Everything is a file descriptor. Open files, sockets, loaded frameworks bundles, even STDIN/OUT/ERROR. You can check if you're hitting the limit of file descriptors by (temporarily) raising the number you can have open with setrlimit(). If you raise it and your app stops crashing,

Re: Networking framework crash

2015-02-05 Thread Michael Nickerson
On Feb 4, 2015, at 9:49 PM, Graham Cox graham@bigpond.com wrote: On 5 Feb 2015, at 12:20 pm, Roland King r...@rols.org wrote: You should google EXC_GUARD, it’s interesting. 0x400200fe the 02 in the middle says the guard is in dup(), which it is. The 0xfe at the end tells

Re: Networking framework crash

2015-02-05 Thread Graham Cox
the stack trace implies anyway. That would make it hard to simply not return a valid object. Not sure what the right design would be there - that's one for the networking architects to ponder I guess. Anyway, thanks for everyone's replies - I have gained a lot of insight into things that I didn't

Re: Networking framework crash

2015-02-05 Thread Roland King
design would be there - that's one for the networking architects to ponder I guess. I don’t think that’s very graceful, no. Since the only ‘documentation’ on EXC_GUARD seems to be in the replies in devforums it’s hard to say exactly what the contract is. However that reply, to my reading

Re: Networking framework crash

2015-02-05 Thread Graham Cox
On 6 Feb 2015, at 11:18 am, Roland King r...@rols.org wrote: whatever Graham did to launch his process in this case got 256, which I haven’t yet found a way to get a process on 10.10 to do by default yet barring making launchd launch it. I simply double-clicked it in the Finder. This is

Re: Networking framework crash

2015-02-05 Thread Greg Parker
there is that the API is asynchronous - it creates the object which then starts a thread to open the socket - that's what the stack trace implies anyway. That would make it hard to simply not return a valid object. Not sure what the right design would be there - that's one for the networking architects

Re: Networking framework crash

2015-02-05 Thread Kyle Sluder
On Thu, Feb 5, 2015, at 05:54 PM, Graham Cox wrote: On 6 Feb 2015, at 6:48 am, Greg Parker gpar...@apple.com wrote: You can use getrlimit(RLIMIT_NOFILE, …) to query the limit in your process, and setrlimit(RLIMIT_NOFILE, …) to attempt to raise it. The default limit may be as low as

Re: Networking framework crash

2015-02-05 Thread Roland King
On 6 Feb 2015, at 8:29 am, Graham Cox graham@bigpond.com wrote: On 6 Feb 2015, at 11:18 am, Roland King r...@rols.org wrote: whatever Graham did to launch his process in this case got 256, which I haven’t yet found a way to get a process on 10.10 to do by default yet barring

Re: Networking framework crash

2015-02-05 Thread Michael Nickerson
On Feb 5, 2015, at 10:22 AM, Roland King r...@rols.org wrote: Everything is a file descriptor. Open files, sockets, loaded frameworks bundles, even STDIN/OUT/ERROR. You can check if you're hitting the limit of file descriptors by (temporarily) raising the number you can have open

Re: Networking framework crash

2015-02-05 Thread Jens Alfke
On Feb 5, 2015, at 7:22 AM, Roland King r...@rols.org wrote: all of which seems to indicate processes have plenty more than 256 file descriptors available by default. I thought 256 was left behind as a default long ago because it was way too small. It was definitely 256 as recently as

Re: Networking framework crash

2015-02-05 Thread Kyle Sluder
On Thu, Feb 5, 2015, at 06:40 PM, Roland King wrote: On 6 Feb 2015, at 8:29 am, Graham Cox graham@bigpond.com wrote: On 6 Feb 2015, at 11:18 am, Roland King r...@rols.org wrote: whatever Graham did to launch his process in this case got 256, which I haven’t yet found a way

Re: Networking framework crash

2015-02-05 Thread Roland King
on devforums or on the networking apple mail list as that’s where Quinn hangs out. That sounds like a good thing to try. --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments

Re: Networking framework crash

2015-02-05 Thread Greg Parker
On Feb 4, 2015, at 8:21 PM, Graham Cox graham@bigpond.com wrote: Do you or anyone else know if there's some inherent limit to the number of simultaneous sockets that can be opened? I'm supposing that there's a 1:1 correspondence between a NSURLSession and a socket, because of the

Re: Networking framework crash

2015-02-04 Thread Michael Crawford
No disrespect, but after 30+ years of developing, I am roughly conversant with debugging strategies. My apologies, I sent my spam before noting who I was sending it to. Of course I know you've been a coder, actually for quite a longer time than I have. There are some other considerations that

Re: Networking framework crash

2015-02-04 Thread Graham Cox
and NSURLSession, I'm opening 1 socket per task as my app starts. So around 50 in my current test situation. if you aren’t opening your own files/creating your own filehandles I suspect you have a bugreport in your future. You might also try a post in CoreOS on devforums or on the networking

Re: Networking framework crash

2015-02-04 Thread Michael Crawford
There are all kinds of ways that your bug could be somewhere else, other than where the processor finds an illegal instruction that generates an exception that yields your panic. There are a number of strategies for dealing with this that are quite a lot easier than single-stepping with a

Networking framework crash

2015-02-04 Thread Graham Cox
Anyone seen this? My fault, or...? OS Version:Mac OS X 10.10.2 (14C109) Report Version:11 Anonymous UUID:41C0442D-1002-83C7-8C29-1DCC8E683B2F Sleep/Wake UUID: 5DE82D59-D0D8-4695-A86E-23F6ABBFAEAB Time Awake Since Boot: 30 seconds Time Since Wake: 6200

Re: Networking framework crash

2015-02-04 Thread Graham Cox
networking, sockets and so on. It's also not happening consistently - I had a couple of these today and then it started working fine. I haven't seen these before either. I do kick off a lot of these sessions at once - it kinda depends on how the user has configured the app, but I'm currently

Re: Networking framework crash

2015-02-04 Thread Alex Zavatone
Hard to tell without the code that surrounds it. On Feb 4, 2015, at 8:00 PM, Graham Cox wrote: Anyone seen this? My fault, or...? OS Version:Mac OS X 10.10.2 (14C109) Report Version:11 Anonymous UUID:41C0442D-1002-83C7-8C29-1DCC8E683B2F Sleep/Wake UUID:

Re: Networking framework crash

2015-02-04 Thread Roland King
You should google EXC_GUARD, it’s interesting. 0x400200fe the 02 in the middle says the guard is in dup(), which it is. The 0xfe at the end tells you what file descriptor it’s on. (0xfe .. really, seems unusually if not impossibly large for a file descriptor, you got that many files

Re: Networking framework crash

2015-02-04 Thread Graham Cox
On 5 Feb 2015, at 1:53 pm, Michael Crawford mdcrawf...@gmail.com wrote: This Spam Has Been Brought To You By: No disrespect, but after 30+ years of developing, I am roughly conversant with debugging strategies. This is not an easy one to isolate, because there's very little information on

Re: Networking framework crash

2015-02-04 Thread Roland King
#914791 There’s a bunch more but they all say much the same thing. if you aren’t opening your own files/creating your own filehandles I suspect you have a bugreport in your future. You might also try a post in CoreOS on devforums or on the networking apple mail list as that’s where Quinn hangs

Networking and sleep

2012-04-12 Thread Lorenzo Thurman
I have an app which attempts to make an internet connection after receiving an NSWorkspaceDidWake notification. Most of the time, the connection fails with the error, ...internet connection appears to be offline (-1009). My guess is the the OS has not yet reinitialized networking before my app

Re: Networking and sleep

2012-04-12 Thread Fritz Anderson
is the the OS has not yet reinitialized networking before my app attempts to connect. So I added a sleepForInterval:10 to make my app wait a bit before connecting. This seems to work just fine, but question is: Is there a more elegant way to handle this? Use the (C-level) SCNetworkReachability API

Re: Networking and sleep

2012-04-12 Thread Lorenzo Thurman
connection appears to be offline (-1009). My guess is the the OS has not yet reinitialized networking before my app attempts to connect. So I added a sleepForInterval:10 to make my app wait a bit before connecting. This seems to work just fine, but question is: Is there a more elegant way to handle

Help diagnosing networking/internet performance issues

2010-11-22 Thread Graham Cox
In working on some networking code, I've come across one test machine on our local net that has extremely slow performance. Like orders of magnitude slower than normal, on the same local network and using the same method (airport, through a single router) as other machines that work just fine

Re: Help diagnosing networking/internet performance issues

2010-11-22 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/22/10 5:31 PM, Graham Cox wrote: In working on some networking code, I've come across one test machine on our local net that has extremely slow performance. Like orders of magnitude slower than normal, on the same local network and using

Re: Help diagnosing networking/internet performance issues

2010-11-22 Thread Dave Keck
Perhaps the bandwidth has been limited using ipfw or a similar utility? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at

Re: Help diagnosing networking/internet performance issues

2010-11-22 Thread Graham Cox
On 23/11/2010, at 12:31 PM, Graham Cox wrote: In working on some networking code, I've come across one test machine on our local net that has extremely slow performance. OK, looks like my Airport hardware is up the swanee. Cut a long story short - none of the suggested diagnostics turned

Re: [iPhone] networking

2009-08-06 Thread James Lin
and more confused instead so far... Thank you in advance... James On 2009/8/5, at 上午 2:13, Luke the Hiesterman wrote: On Aug 4, 2009, at 11:10 AM, James Lin wrote: Bonjour is for local area network, right? No, Bonjour is applicable to any networking, local or wide area. Here's some

Re: General approach to networking/server problem?

2009-08-06 Thread Alastair Houghton
and its standard input), then use a conventional web server to do the actual networking part. You could either put arguments into a POST (perhaps send a block of XML that you can then parse at the Foundation end), or you could stick them in the URL, and so on. The benefit of that approach

Re: [iPhone] networking

2009-08-06 Thread James Lin
My goal: 1. 1 iPhone running my app working as a server waiting for connection from another iPhone from the internet. 2. Another iPhone running my app working as a client connects to the server iPhone and send a string hi, I am James. 3. The server iPhone, upon receiving this string reply

Re: [iPhone] networking

2009-08-06 Thread Keith Duncan
On 6 Aug 2009, at 09:13, Roland King wrote: I've never seen any. I assume that as well as multicast dns there are ways to configure bonjour to point to some central DNS server which would enable something like that to work Yes, you can use regular unicast DNS, and query a specified DNS

Re: [iPhone] networking

2009-08-06 Thread Keith Duncan
On 6 Aug 2009, at 09:27, James Lin wrote: [...] keeps querrying the php/mysql server for message left for it with a querry to php/mysql server inside a NSTimer (say querry once every 30 seconds). [...] Is this my best option given what I want to accomplish? I'm afraid it isn't,

Re: [iPhone] networking

2009-08-06 Thread James Lin
Can you please elaborate a bit more? What technology option do I have when it comes to a messaging server? What's involved on the iPhone's side? Thank you in advance... James On 2009/8/6, at 下午 4:33, Keith Duncan wrote: On 6 Aug 2009, at 09:27, James Lin wrote: [...] keeps querrying the

Re: [iPhone] networking

2009-08-06 Thread Jeremy Pereira
On 6 Aug 2009, at 09:27, James Lin wrote: Is this my best option given what I want to accomplish? Thanks in advance... Stepping back a little bit. Are you trying to build some sort of real time messaging service? Or does it matter if the second phone doesn't receive the message

Re: [iPhone] networking

2009-08-06 Thread James Lin
well...I guess you can call it some sort of real time messaging service... I just need to send a string from iPhoneA to iPhoneB. And allow iPhoneB to reply with another string back to iPhoneA. That's all I am trying to do. I had no idea it is so difficult and involves so much. given my state

Re: [iPhone] networking

2009-08-05 Thread glenn andreas
On Aug 4, 2009, at 4:42 PM, Shawn Erickson wrote: On Tue, Aug 4, 2009 at 11:13 AM, Luke the Hiestermanluket...@apple.com wrote: On Aug 4, 2009, at 11:10 AM, James Lin wrote: Bonjour is for local area network, right? No, Bonjour is applicable to any networking, local or wide area

Re: [iPhone] networking

2009-08-05 Thread Kyle Sluder
On Aug 4, 2009, at 4:42 PM, Shawn Erickson wrote: Of course, in the context of the original question (re: iPhone networking), the iPhone is almost never going to have a public IP address (being hidden behind WiFi or cell phone NATs). Assuming cell carriers don't get off their butts

Re: [iPhone] networking

2009-08-05 Thread Kaelten
a string hello, I am James to the server iPhone and the server iPhone reply with the user's choice of either Hi, Nice to meet you or Get lost! strings. Unless the two phones are on the same local WiFi network, due to the way that various NATs (especially with cell phone networking), a client

[iPhone] networking-is it crippled on the simulator?

2009-08-04 Thread James Lin
Hi all, Does anyone know the limitation of the iPhone simulator when it comes to networking? Is it crippled on the simulator? I've tried two seperate ways of opening up a server socket. 1. is by opening up a CFSocket 2. is by a socket wrapper class called LXSocket class obtained from

Re: [iPhone] networking-is it crippled on the simulator?

2009-08-04 Thread John C. Randolph
On Aug 4, 2009, at 5:43 AM, James Lin wrote: Hi all, Does anyone know the limitation of the iPhone simulator when it comes to networking? Is it crippled on the simulator? I've tried two seperate ways of opening up a server socket. 1. is by opening up a CFSocket 2. is by a socket wrapper

Re: [iPhone] networking-is it crippled on the simulator?

2009-08-04 Thread James Lin
Safari works for me too... The reason I am asking this seemingly redundant question is simply : I don't have an iPhone yet (3GS won't be available in my country until end of Aug) and I am doing all my programming blind on the simulator. if networking is crippled on the simulator, that means

Re: [iPhone] networking-is it crippled on the simulator?

2009-08-04 Thread Roland King
on the simulator. if networking is crippled on the simulator, that means my development work has to take a break until I get my hands on an actual iPhone.. Does anyone know? Thank you in advance... James On 2009/8/4, at 下午 9:04, John C. Randolph wrote: On Aug 4, 2009, at 5:43 AM, James Lin wrote

Re: [iPhone] networking-is it crippled on the simulator?

2009-08-04 Thread Luke the Hiesterman
Networking should work on the simulator. There are several networking related pieces of sample code that work on the simulator. http://developer.apple.com/iphone/library/navigation/SampleCode.html Luke On Aug 4, 2009, at 6:48 AM, James Lin wrote: Safari works for me too... The reason I am

Re: [iPhone] networking-is it crippled on the simulator?

2009-08-04 Thread Dave Camp
On Aug 4, 2009, at 5:43 AM, James Lin wrote: Hi all, Does anyone know the limitation of the iPhone simulator when it comes to networking? Is it crippled on the simulator? I've tried two seperate ways of opening up a server socket. By server socket, do you mean you are trying to connect

Re: [iPhone] networking

2009-08-04 Thread James Lin
again... James On 2009/8/4, at 下午 11:50, Dave Camp wrote: On Aug 4, 2009, at 5:43 AM, James Lin wrote: Hi all, Does anyone know the limitation of the iPhone simulator when it comes to networking? Is it crippled on the simulator? I've tried two seperate ways of opening up a server socket

Re: [iPhone] networking

2009-08-04 Thread Luke the Hiesterman
to networking? Is it crippled on the simulator? I've tried two seperate ways of opening up a server socket. By server socket, do you mean you are trying to connect to a server somewhere, or that you are trying to open a low numbered (i.e. 1024) port locally so that you can be a server

Re: [iPhone] networking

2009-08-04 Thread glenn andreas
, I am James to the server iPhone and the server iPhone reply with the user's choice of either Hi, Nice to meet you or Get lost! strings. Unless the two phones are on the same local WiFi network, due to the way that various NATs (especially with cell phone networking), a client will almost

Re: [iPhone] networking

2009-08-04 Thread James Lin
and banging my head against the wall... Any ideas/suggestions are greatly appreciated... Thanx again... James On 2009/8/4, at 下午 11:50, Dave Camp wrote: On Aug 4, 2009, at 5:43 AM, James Lin wrote: Hi all, Does anyone know the limitation of the iPhone simulator when it comes to networking

Re: [iPhone] networking

2009-08-04 Thread Luke the Hiesterman
/suggestions are greatly appreciated... Thanx again... James On 2009/8/4, at 下午 11:50, Dave Camp wrote: On Aug 4, 2009, at 5:43 AM, James Lin wrote: Hi all, Does anyone know the limitation of the iPhone simulator when it comes to networking? Is it crippled on the simulator? I've tried two

Re: [iPhone] networking

2009-08-04 Thread James Lin
networking), a client will almost certainly not be able to connect to a server running on the phone. Basically, the phone see only a local (private) network, and will have an address such as 10.3.5.12. Unfortunately, that IP address is meaningless outside of local network (there is no way

Re: [iPhone] networking

2009-08-04 Thread James Lin
, Dave Camp wrote: On Aug 4, 2009, at 5:43 AM, James Lin wrote: Hi all, Does anyone know the limitation of the iPhone simulator when it comes to networking? Is it crippled on the simulator? I've tried two seperate ways of opening up a server socket. By server socket, do you mean you are trying

Re: [iPhone] networking

2009-08-04 Thread Shawn Erickson
On Tue, Aug 4, 2009 at 11:13 AM, Luke the Hiestermanluket...@apple.com wrote: On Aug 4, 2009, at 11:10 AM, James Lin wrote: Bonjour is for local area network, right? No, Bonjour is applicable to any networking, local or wide area. Here's some sample code. http://developer.apple.com/iphone

Re: Networking

2009-07-14 Thread Greg Guerin
? You can't just send arbitrary binary data to an HTTP server and expect it to work. You have to follow the HTTP protocol as defined in the relevant RFCs. So, my question is, does anybody know of any other ways - or good beginner's guides - to networking in situations like

Networking

2009-07-13 Thread Christopher J Kemsley
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 (Cocoa-dev@lists.apple.com

Networking

2009-04-15 Thread Filip van der Meeren
I am trying to create a networking feature for my application. What should I use? - BSD Sockets - CF... - NSSocketPort - ... And where is some decent information about the subject. I would love to work a bit closer with the Core Foundation, but I am afraid it is going down the same drain

Re: Networking

2009-04-15 Thread I. Savant
On Wed, Apr 15, 2009 at 3:29 PM, Filip van der Meeren fi...@code2develop.com wrote: I am trying to create a networking feature for my application. What should I use? You're going to have to be more specific than that. What *kind* of networking feature? Loading a web resource? Acting

Re: Networking

2009-04-15 Thread Filip van der Meeren
On 15 Apr 2009, at 21:39, I. Savant wrote: On Wed, Apr 15, 2009 at 3:29 PM, Filip van der Meeren fi...@code2develop.com wrote: I am trying to create a networking feature for my application. What should I use? You're going to have to be more specific than that. What *kind* of networking

Re: Networking

2009-04-15 Thread I. Savant
/GS_Networking/ ... and here ... http://developer.apple.com/samplecode/Networking/idxCocoa-date.html -- I.S. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators

networking question

2008-04-10 Thread Valentin Dan
Hi, What’s the best way to create a connection to a server in Cocoa + Objective-C ? Is there another way than BSD sockets or CFSocketRef ? ___ Valentin Dan, Software Developer Direct: +1 905 886 1833

RE: networking question

2008-04-10 Thread Valentin Dan
16:52 To: Valentin Dan Cc: cocoa-dev@lists.apple.com Subject: Re: networking question On 10 Apr 2008, at 14:24, Valentin Dan wrote: What’s the best way to create a connection to a server in Cocoa + Objective-C ? It depends what you're trying to achieve. If your server is also implemented

Re: networking question

2008-04-10 Thread Alastair Houghton
On 10 Apr 2008, at 15:22, Valentin Dan wrote: A few more details :) - server: Windows (so absolutely not Cocoa) - communication : XML messages (need to both send receive messages) What kind of XML messages? Over what kind of transport? HTTP? Something else? XML on its own is just a

Re: Windows networking API

2008-03-26 Thread Ken Thomases
On Mar 25, 2008, at 10:41 AM, Robert Claeson wrote: Is there an API/framework to interface with the SMB/Samba/Windows networking functionality of OS X? More specifically, I need to: * Find the Active Directory domain (or Windows workgroup name if not in an AD network) * Ensure that the OS

Windows networking API

2008-03-25 Thread Robert Claeson
Is there an API/framework to interface with the SMB/Samba/Windows networking functionality of OS X? More specifically, I need to: * Find the Active Directory domain (or Windows workgroup name if not in an AD network) * Ensure that the OS X user is authenticated via AD (if available) As you