2 ms·
that's a good idea, but keep in mind that the underlying file descriptor could be of a UDP stream, or a TCP stream to another host. I finally solved the problem
by ttouch 7y ago
that's a good idea, but keep in mind that the underlying file descriptor could be of a UDP stream, or a TCP stream to another host. I finally solved the problem, check out https://github.com/dzervas/mage/blob/master/src/api_ffi.rs https://github.com/dzervas/mage/blob/master/src/api_ffi.rs. When you bind or connect, I return a "file descriptor" that you will pass back to me and I use it as an index to a vector of connections :)
It works fairly good - although I have other problems...
- db48x 7y agoTrue enough! I thought you were just going to see existing connections or something. What you're doing is probably what's going on under the hood anyway.