{"action":"created","issue":{"url":"https://api.github.com/repos/libuv/libuv/issues/200","labels_url":"https://api.github.com/repos/libuv/libuv/issues/200/labels{/name}","comments_url":"https://api.github.com/repos/libuv/libuv/issues/200/comments","events_url":"https://api.github.com/repos/libuv/libuv/issues/200/events","html_url":"https://github.com/libuv/libuv/issues/200","id":57310460,"number":200,"title":"uv_open","user":{"login":"txdv","id":116642,"avatar_url":"https://avatars.githubusercontent.com/u/116642?v=3","gravatar_id":"","url":"https://api.github.com/users/txdv","html_url":"https://github.com/txdv","followers_url":"https://api.github.com/users/txdv/followers","following_url":"https://api.github.com/users/txdv/following{/other_user}","gists_url":"https://api.github.com/users/txdv/gists{/gist_id}","starred_url":"https://api.github.com/users/txdv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/txdv/subscriptions","organizations_url":"https://api.github.com/users/txdv/orgs","repos_url":"https://api.github.com/users/txdv/repos","events_url":"https://api.github.com/users/txdv/events{/privacy}","received_events_url":"https://api.github.com/users/txdv/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-11T12:36:11Z","updated_at":"2015-02-12T18:50:15Z","closed_at":null,"body":"I was looking into the code and one thing stood out in my eyes: we have functions like uv_write and uv_fileno which basically accept any kind of handle and dependent on the type of it (which is a basically a variable in the struct) it determines what to do.\r\n\r\nYet we have multiple functions for opening an already existing file descriptor: uv_tcp_open, uv_udp_open.\r\n\r\nThe most annoying part IMO is that there is no uv_tty_open, even though the constructor of uv_tty_init requires a file descriptor. I think we could move the functionality of opening a file descriptor in a tty to open.\r\n\r\nI think creating uv_open would make writing bindings easier, because currently [it kinda is a lot of code](https://github.com/txdv/LibuvSharp/blob/master/LibuvSharp/HandleFileDescriptor.cs#L43-L87)."},"comment":{"url":"https://api.github.com/repos/libuv/libuv/issues/comments/74128330","html_url":"https://github.com/libuv/libuv/issues/200#issuecomment-74128330","issue_url":"https://api.github.com/repos/libuv/libuv/issues/200","id":74128330,"user":{"login":"txdv","id":116642,"avatar_url":"https://avatars.githubusercontent.com/u/116642?v=3","gravatar_id":"","url":"https://api.github.com/users/txdv","html_url":"https://github.com/txdv","followers_url":"https://api.github.com/users/txdv/followers","following_url":"https://api.github.com/users/txdv/following{/other_user}","gists_url":"https://api.github.com/users/txdv/gists{/gist_id}","starred_url":"https://api.github.com/users/txdv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/txdv/subscriptions","organizations_url":"https://api.github.com/users/txdv/orgs","repos_url":"https://api.github.com/users/txdv/repos","events_url":"https://api.github.com/users/txdv/events{/privacy}","received_events_url":"https://api.github.com/users/txdv/received_events","type":"User","site_admin":false},"created_at":"2015-02-12T18:50:15Z","updated_at":"2015-02-12T18:50:15Z","body":"We could use IntPtr and cast to Int on unix only."}}