I'm wondering if anyone has a kqueue outgoing socket example. What I mean is something that uses kqueue and connects to somewhere (in the example, let's say 22.214.171.124 on port 1234), and then polls the socket and when it gets data, calls the function receive_data(data), with data being the data.
1. Sets up a kqueue queue, then using a socket and kqueue, connects to 126.96.36.199 on port 1234.
2. Polls the socket and waits for a response, then calls receive_data(data). Then continues to do this. (not just connecting, waiting for a single line of data, then disconnecting)
Thank you very much!