Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using a custom mach port name #26

Open
khcrysalis opened this issue Dec 16, 2024 · 1 comment
Open

Using a custom mach port name #26

khcrysalis opened this issue Dec 16, 2024 · 1 comment

Comments

@khcrysalis
Copy link

I've come across this library for use in one of my projects but I've found that I couldn't communicate with my own xpc service as there's no way to specify a mach port name to connect to, from my understanding the provided examples are more geared towards using launchctl commands.

If theres any insight on how I could achieve this would be very much appreciated!

@mach-kernel
Copy link
Owner

Hi @khcrysalis! To understand your use case a little better, do you already have a mach_port_t?

A bit rusty since I haven't had a Mac for a bit, but I think you could do something like:

  • xpc_pipe_create_from_port to get a pipe from your Mach port
  • Try adding a param here to pass in your custom xpc_pipe_t.

Give it a whirl and let me know if it works. Happy to accept a PR for this!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants