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

Will it support system API hooks in the future? For example, sleep, connect, recv, etc. #465

Closed
mankouzhuya opened this issue Apr 25, 2024 · 2 comments

Comments

@mankouzhuya
Copy link

No description provided.

@lihuiba
Copy link
Collaborator

lihuiba commented Apr 25, 2024

I'm not sure, because none of us have prior experiences on this. And I doubt that its compatibility issues may make it little use in real applications.

Can you describe more about your situation?

@beef9999
Copy link
Collaborator

beef9999 commented Apr 25, 2024

@mankouzhuya Because the libc API still has its use. Considering you need to write a file in disk or tmpfs, then libc's write is always the feasible way to do it, even we can also use Photon's capsulation of libaio or io_uring.

In a word, networking is a important part, but not all that we concern. We'd best just provide the alternatives, rather then overwrite them.

Photon's basic networking API calls are in net/basic_socket.h. For instance, photon::net::recv equals to libc's recv, and can only work in the coroutine runtime.

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

No branches or pull requests

3 participants