{"action":"created","issue":{"url":"https://api.github.com/repos/meqif/rust-utp/issues/3","labels_url":"https://api.github.com/repos/meqif/rust-utp/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/meqif/rust-utp/issues/3/comments","events_url":"https://api.github.com/repos/meqif/rust-utp/issues/3/events","html_url":"https://github.com/meqif/rust-utp/issues/3","id":87723901,"number":3,"title":"Small enhancements please","user":{"login":"ned14","id":230408,"avatar_url":"https://avatars.githubusercontent.com/u/230408?v=3","gravatar_id":"","url":"https://api.github.com/users/ned14","html_url":"https://github.com/ned14","followers_url":"https://api.github.com/users/ned14/followers","following_url":"https://api.github.com/users/ned14/following{/other_user}","gists_url":"https://api.github.com/users/ned14/gists{/gist_id}","starred_url":"https://api.github.com/users/ned14/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ned14/subscriptions","organizations_url":"https://api.github.com/users/ned14/orgs","repos_url":"https://api.github.com/users/ned14/repos","events_url":"https://api.github.com/users/ned14/events{/privacy}","received_events_url":"https://api.github.com/users/ned14/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-06-12T13:12:20Z","updated_at":"2015-06-13T22:10:49Z","closed_at":"2015-06-12T15:39:44Z","body":"Some really small stuff:\r\n\r\n* I can't convert an existing UtpSocket into a UtpStream (no suitable constructor).\r\n\r\n* If I bind to 0.0.0.0:0, the underlying UdpSocket will choose a random port. I have no way of retrieving that random port allocation from UtpSocket nor UtpListener currently.\r\n\r\n* UtpListener::accept() doesn't return a (UtpSocket, SocketAddr) like TcpListener does.\r\n\r\nThanks,\r\nNiall\r\n"},"comment":{"url":"https://api.github.com/repos/meqif/rust-utp/issues/comments/111755642","html_url":"https://github.com/meqif/rust-utp/issues/3#issuecomment-111755642","issue_url":"https://api.github.com/repos/meqif/rust-utp/issues/3","id":111755642,"user":{"login":"meqif","id":1706,"avatar_url":"https://avatars.githubusercontent.com/u/1706?v=3","gravatar_id":"","url":"https://api.github.com/users/meqif","html_url":"https://github.com/meqif","followers_url":"https://api.github.com/users/meqif/followers","following_url":"https://api.github.com/users/meqif/following{/other_user}","gists_url":"https://api.github.com/users/meqif/gists{/gist_id}","starred_url":"https://api.github.com/users/meqif/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meqif/subscriptions","organizations_url":"https://api.github.com/users/meqif/orgs","repos_url":"https://api.github.com/users/meqif/repos","events_url":"https://api.github.com/users/meqif/events{/privacy}","received_events_url":"https://api.github.com/users/meqif/received_events","type":"User","site_admin":false},"created_at":"2015-06-13T22:10:49Z","updated_at":"2015-06-13T22:10:49Z","body":"I see. I'd prefer to keep the API as close to `TcpStream` as possible, as you've probably noticed, so the second way seems better to me. I need to think some more about this, though.\r\n\r\nI tried playing a bit with a socket wrapped in an Arc and a Mutex (`Arc::new(Mutex::new(socket))`) and a listening thread, and it seemed to work reasonably well without changes in the library, but that was a toy.\r\n\r\nTo keep things clean, would you mind opening a separate issue with that comment?\r\n\r\nBy the way, 0.6.0 is out. `UtpSocket::connect` is now more similar to its `TcpStream` counterpart — it's an associated function instead of a method, which avoids the `bind` call before `connect`. That's a breaking change, although a small one."}}