{"action":"created","issue":{"url":"https://api.github.com/repos/etcimon/libasync/issues/15","labels_url":"https://api.github.com/repos/etcimon/libasync/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/etcimon/libasync/issues/15/comments","events_url":"https://api.github.com/repos/etcimon/libasync/issues/15/events","html_url":"https://github.com/etcimon/libasync/pull/15","id":58573531,"number":15,"title":"Using ranges as recv and send args","user":{"login":"GeorgeSapkin","id":5013206,"avatar_url":"https://avatars.githubusercontent.com/u/5013206?v=3","gravatar_id":"","url":"https://api.github.com/users/GeorgeSapkin","html_url":"https://github.com/GeorgeSapkin","followers_url":"https://api.github.com/users/GeorgeSapkin/followers","following_url":"https://api.github.com/users/GeorgeSapkin/following{/other_user}","gists_url":"https://api.github.com/users/GeorgeSapkin/gists{/gist_id}","starred_url":"https://api.github.com/users/GeorgeSapkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeorgeSapkin/subscriptions","organizations_url":"https://api.github.com/users/GeorgeSapkin/orgs","repos_url":"https://api.github.com/users/GeorgeSapkin/repos","events_url":"https://api.github.com/users/GeorgeSapkin/events{/privacy}","received_events_url":"https://api.github.com/users/GeorgeSapkin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-02-23T11:24:21Z","updated_at":"2015-02-23T16:08:59Z","closed_at":"2015-02-23T12:25:21Z","pull_request":{"url":"https://api.github.com/repos/etcimon/libasync/pulls/15","html_url":"https://github.com/etcimon/libasync/pull/15","diff_url":"https://github.com/etcimon/libasync/pull/15.diff","patch_url":"https://github.com/etcimon/libasync/pull/15.patch"},"body":"I've replaced the byte arrays with input range for `recv` and output range for `send` so custom ranges (eg. circular buffer) can be used with these methods."},"comment":{"url":"https://api.github.com/repos/etcimon/libasync/issues/comments/75572666","html_url":"https://github.com/etcimon/libasync/pull/15#issuecomment-75572666","issue_url":"https://api.github.com/repos/etcimon/libasync/issues/15","id":75572666,"user":{"login":"GeorgeSapkin","id":5013206,"avatar_url":"https://avatars.githubusercontent.com/u/5013206?v=3","gravatar_id":"","url":"https://api.github.com/users/GeorgeSapkin","html_url":"https://github.com/GeorgeSapkin","followers_url":"https://api.github.com/users/GeorgeSapkin/followers","following_url":"https://api.github.com/users/GeorgeSapkin/following{/other_user}","gists_url":"https://api.github.com/users/GeorgeSapkin/gists{/gist_id}","starred_url":"https://api.github.com/users/GeorgeSapkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeorgeSapkin/subscriptions","organizations_url":"https://api.github.com/users/GeorgeSapkin/orgs","repos_url":"https://api.github.com/users/GeorgeSapkin/repos","events_url":"https://api.github.com/users/GeorgeSapkin/events{/privacy}","received_events_url":"https://api.github.com/users/GeorgeSapkin/received_events","type":"User","site_admin":false},"created_at":"2015-02-23T16:08:59Z","updated_at":"2015-02-23T16:08:59Z","body":"Do I understand you correctly that in `BufferedTCPConnection` there would be something like this:\r\n```D\r\nAsyncTCPConnection m_asyncConn;\r\n\r\nuint recv(R)(ref R ub)\r\nif (isOutputRange!(R, ubyte) && __traits(compiles, ub.length))\r\n{\r\n    auto localBuffer = scoped!(ubyte[ub.length]);\r\n    uint cnt = m_asyncConn.recv(localBuffer);\r\n    copy(localBuffer, &ub);\r\n    return cnt;\r\n}\r\n```"}}