{"issue":{"created_at":"2011-12-10T14:10:18Z","state":"closed","updated_at":"2011-12-11T22:18:31Z","user":{"gravatar_id":"c66daedbfd582bf11e4f35c3ef95658f","id":141683,"url":"https://api.github.com/users/fholm","avatar_url":"https://secure.gravatar.com/avatar/c66daedbfd582bf11e4f35c3ef95658f?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"fholm"},"comments":5,"body":"Added an overload to the Socket.Recv method which has the signature `byte[] Recv(byte[] message, out int size, params SendRecvOpt[] flags)` to allow a `byte[]` to be supplied to the `Recv` function, and if it has enough space that buffer will be used instead of allocating a new `byte[]` constantly which causes a lot of pressure on the GC during high frequency messaging.\r\n\r\nThe supplied `message` parameter will only be used if two conditions are met: \r\n\r\n * It's not null\r\n * It's `Length` property is larger then or equal to the size of the message\r\n\r\nThe size of the read message is also passed out through the `out int size` parameter so that in the case of using a `message` parameter which is larger then the message returned there is a way to find out how many bytes of the array that the message occupies.","assignee":null,"id":2511119,"labels":[],"pull_request":{"patch_url":"https://github.com/zeromq/clrzmq2/pull/34.patch","html_url":"https://github.com/zeromq/clrzmq2/pull/34","diff_url":"https://github.com/zeromq/clrzmq2/pull/34.diff"},"number":34,"title":"New overload for Socket.Recv","html_url":"https://github.com/zeromq/clrzmq2/issues/34","closed_at":"2011-12-11T21:53:36Z","url":"https://api.github.com/repos/zeromq/clrzmq2/issues/34","milestone":null},"action":"created","comment":{"created_at":"2011-12-11T22:18:31Z","updated_at":"2011-12-11T22:18:31Z","user":{"gravatar_id":"ffd525ab7c7bcf11d1655aea552ee840","id":132233,"url":"https://api.github.com/users/jgoz","avatar_url":"https://secure.gravatar.com/avatar/ffd525ab7c7bcf11d1655aea552ee840?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"jgoz"},"body":"Thanks Fredrik, I just merged your changes in. I made some minor formatting and wording changes, but left it as-is otherwise.\r\n\r\nFYI, I will be renaming this repository today (removing the \"2\"), so you will need to update your remotes if you are making further enhancements.\r\n\r\nThanks for contributing! I'll be adding functional tests over the next week or two and I'll make sure your overloads get covered.","id":3100107,"url":"https://api.github.com/repos/zeromq/clrzmq2/issues/comments/3100107"}}