Coder Social home page Coder Social logo

Comments (6)

gghose avatar gghose commented on July 26, 2024

I have a correction to make. I don't believe the problem is the address and routing, but rather with the port number being less than 1024. Again though, running as sudo doesn't solve this problem. So I how do I listen to a reserved port? (I am communicating with an external device whose port number is fixed at 1002, so the answer change the port doesn't work!)

from cocoaasyncsocket.

gghose avatar gghose commented on July 26, 2024

sudo isn't "convincing" enough apparently. When I turn on the setuid bit, change ownership to root, relink to a fixed path dynamic framework, and run, then it open up the port.

Yuck. Yuck.

It looks like I'm going to have to delve into BetterAuthorizationSample and somehow integrate it into CocoaAsync. Given that running on such ports is not exactly uncommon (after all every web server does it), has anybody already done this or do I need to reinvent the wheel?

from cocoaasyncsocket.

gghose avatar gghose commented on July 26, 2024

This is a disaster. I've spent days trying to get the BetterAuthorizationSample code to work. It appears to do everything fine, no errors generated creating and binding a privileged UDP port. But when I used the BSD socket created by the privileged tool with a CFSocketCreateWithNative, the socket is not functional: it is always silent. This is not a bug in cocoasync per se, but rather something about the complex nature of BetterAuthorizationSample. I know this because a unprivileged port works without the Helper, but as soon as the Helper is invoked it fails.

Horrible!

from cocoaasyncsocket.

fpillet avatar fpillet commented on July 26, 2024

Have you tried signing your application? authorization is complicated as it doubles up with the firewall which itselfs needs to sign your app with proper authorizations.

from cocoaasyncsocket.

gghose avatar gghose commented on July 26, 2024

I didn't, but the example code from Apple doesn't mention anything about code signing. As near as I can tell, it might preclude subsequent authorization requests, but that initial authorization request seems to be accepted, and it still doesn't work.

from cocoaasyncsocket.

github-actions avatar github-actions commented on July 26, 2024

This issue has been marked as stale, it will be closed automatically if there is no further activity.

from cocoaasyncsocket.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.