We have two apps
How to achieve this?
We are trying to use many scenarios but:
One option would be for the server (1st process) to send the socket file descriptor to the sender (2nd process), so that they both share the same kernel UDP socket file description (rather then 2 sockets bound to the same port), but only one process (the server) reads from it.
You can pass a file descriptor to another process using either fork
or fork-exec
or Unix domain sockets SCM_RIGHTS
ancillary messages .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.