Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
AsyncUdpSocket for ARC?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Hadmut Danisch  
View profile  
 More options Jan 3, 6:34 pm
From: Hadmut Danisch <had...@danisch.de>
Date: Wed, 04 Jan 2012 00:34:10 +0100
Local: Tues, Jan 3 2012 6:34 pm
Subject: AsyncUdpSocket for ARC?
Hi,

just a minor question:

I tried to use the async sockets for UDP sockets with ARC under iOS5
sdk, but ran into the problem that the arc branch does not contain the
UDP class, and the master branch's AsyncUdpSocket and GCDAsyncUdpSocket
do not compile with ARC and regular compiler settings. It's not just
simple changes of pointer handling. The compiler also complains about
some gotos, that jump over variable declarations and thus break the ref
counting.

I'm currently a beginner with iOS programming and busy with getting used
to it, so I'm not yet really familiar with every detail of the former
and the new memory management model. My assumption is that the main
changes will be to replace methods like retain, release with simple
pointer assignments, but replacing the gotos would require changes in
the program's logic and flow.

Is anyone more experienced with iOS and the asyncsocket library planning
to make a ARC version of the UDP socket?

best regards
Hadmut


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sean McBride  
View profile  
 More options Jan 4, 5:57 pm
From: "Sean McBride" <s...@rogue-research.com>
Date: Wed, 4 Jan 2012 17:57:27 -0500
Local: Wed, Jan 4 2012 5:57 pm
Subject: Re: AsyncUdpSocket for ARC?
On Wed, 4 Jan 2012 00:34:10 +0100, Hadmut Danisch said:

>I tried to use the async sockets for UDP sockets with ARC under iOS5
>sdk, but ran into the problem that the arc branch does not contain the
>UDP class, and the master branch's AsyncUdpSocket and GCDAsyncUdpSocket
>do not compile with ARC and regular compiler settings. It's not just
>simple changes of pointer handling. The compiler also complains about
>some gotos, that jump over variable declarations and thus break the ref
>counting.

I haven't tried the ARC branch, but CocoaAsyncSocket doesn't need to support ARC to work in an ARC application.  ARC apps can use manual ref counted code, just add -fno-objc-arc to any files that aren't ARC.

--
____________________________________________________________
Sean McBride, B. Eng                 s...@rogue-research.com
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Hadmut Danisch  
View profile  
 More options Jan 4, 6:19 pm
From: Hadmut Danisch <had...@danisch.de>
Date: Thu, 05 Jan 2012 00:19:15 +0100
Local: Wed, Jan 4 2012 6:19 pm
Subject: Re: AsyncUdpSocket for ARC?
Am 04.01.2012 23:57, schrieb Sean McBride:

> I haven't tried the ARC branch, but CocoaAsyncSocket doesn't need to support ARC to work in an ARC application.  ARC apps can use manual ref counted code, just add -fno-objc-arc to any files that aren't ARC.

Yeah, I've seen that somewhere, but I'm not sure whether it is a good
idea to mix code with and without that flag. I always prefer the clean
version over the workaround. And for the TCP socket, there is for some
reason a separate arc version. So maybe the UDP version is under
construction as well...

regards


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike  
View profile  
 More options Jan 4, 9:21 pm
From: Mike <coolgreenea...@gmail.com>
Date: Wed, 4 Jan 2012 21:21:24 -0500
Local: Wed, Jan 4 2012 9:21 pm
Subject: Re: AsyncUdpSocket for ARC?
Could you please point to the ARC version?
It seems to me that all the files are the same.

On Jan 4, 2012, at 6:19 PM, Hadmut Danisch wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jan C.  
View profile  
 More options Jan 18, 8:55 am
From: "Jan C." <jan.chaloupe...@gmail.com>
Date: Wed, 18 Jan 2012 05:55:11 -0800 (PST)
Local: Wed, Jan 18 2012 8:55 am
Subject: Re: AsyncUdpSocket for ARC?
ARC works during compilation not during runtime so it is perfectly ok
to mix ARC and non ARC code. Basically, with ARC, the compiler will
itself insert retain/realease calls into your code before actually
compiling

cheers ;)

On Jan 5, 12:19 am, Hadmut Danisch <had...@danisch.de> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »