{"action":"created","issue":{"url":"https://api.github.com/repos/andysworkshop/stm32plus/issues/111","labels_url":"https://api.github.com/repos/andysworkshop/stm32plus/issues/111/labels{/name}","comments_url":"https://api.github.com/repos/andysworkshop/stm32plus/issues/111/comments","events_url":"https://api.github.com/repos/andysworkshop/stm32plus/issues/111/events","html_url":"https://github.com/andysworkshop/stm32plus/issues/111","id":71645001,"number":111,"title":"Clarify buffer safety in stm32plus::net","user":{"login":"mikepurvis","id":944666,"avatar_url":"https://avatars.githubusercontent.com/u/944666?v=3","gravatar_id":"","url":"https://api.github.com/users/mikepurvis","html_url":"https://github.com/mikepurvis","followers_url":"https://api.github.com/users/mikepurvis/followers","following_url":"https://api.github.com/users/mikepurvis/following{/other_user}","gists_url":"https://api.github.com/users/mikepurvis/gists{/gist_id}","starred_url":"https://api.github.com/users/mikepurvis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikepurvis/subscriptions","organizations_url":"https://api.github.com/users/mikepurvis/orgs","repos_url":"https://api.github.com/users/mikepurvis/repos","events_url":"https://api.github.com/users/mikepurvis/events{/privacy}","received_events_url":"https://api.github.com/users/mikepurvis/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/andysworkshop/stm32plus/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":{"login":"andysworkshop","id":4107468,"avatar_url":"https://avatars.githubusercontent.com/u/4107468?v=3","gravatar_id":"","url":"https://api.github.com/users/andysworkshop","html_url":"https://github.com/andysworkshop","followers_url":"https://api.github.com/users/andysworkshop/followers","following_url":"https://api.github.com/users/andysworkshop/following{/other_user}","gists_url":"https://api.github.com/users/andysworkshop/gists{/gist_id}","starred_url":"https://api.github.com/users/andysworkshop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andysworkshop/subscriptions","organizations_url":"https://api.github.com/users/andysworkshop/orgs","repos_url":"https://api.github.com/users/andysworkshop/repos","events_url":"https://api.github.com/users/andysworkshop/events{/privacy}","received_events_url":"https://api.github.com/users/andysworkshop/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2015-04-28T16:57:34Z","updated_at":"2015-04-29T20:01:59Z","closed_at":"2015-04-28T19:59:54Z","body":"Having some issues with my application which I believe are down to calling `net->read` and `net->write` in the manner of a Unix socket, which appears not to be safe, as the data is not copied to an internal buffer. I think I'd benefit from some clarification on the following questions:\r\n\r\n - Can I call `TcpClientConnection::receive` at my leisure, or only in the context of the event handler? The examples seem to go both ways on this.\r\n - What's the capacity of the receive behaviour? Do I have control over that? What happens when it fills up?\r\n - For `TcpClientConnection::send`, it looks like it's DMA code in use, which means the pointer I pass it needs to survive to some point in the future when the data is actually transferred. Is there's a blessed scheme for sending a transient buffer, or should I just roll my own?\r\n\r\nThanks."},"comment":{"url":"https://api.github.com/repos/andysworkshop/stm32plus/issues/comments/97565344","html_url":"https://github.com/andysworkshop/stm32plus/issues/111#issuecomment-97565344","issue_url":"https://api.github.com/repos/andysworkshop/stm32plus/issues/111","id":97565344,"user":{"login":"mikepurvis","id":944666,"avatar_url":"https://avatars.githubusercontent.com/u/944666?v=3","gravatar_id":"","url":"https://api.github.com/users/mikepurvis","html_url":"https://github.com/mikepurvis","followers_url":"https://api.github.com/users/mikepurvis/followers","following_url":"https://api.github.com/users/mikepurvis/following{/other_user}","gists_url":"https://api.github.com/users/mikepurvis/gists{/gist_id}","starred_url":"https://api.github.com/users/mikepurvis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikepurvis/subscriptions","organizations_url":"https://api.github.com/users/mikepurvis/orgs","repos_url":"https://api.github.com/users/mikepurvis/repos","events_url":"https://api.github.com/users/mikepurvis/events{/privacy}","received_events_url":"https://api.github.com/users/mikepurvis/received_events","type":"User","site_admin":false},"created_at":"2015-04-29T20:01:59Z","updated_at":"2015-04-29T20:01:59Z","body":"I did note that both of them are potentially blocking functions, which yes, does make them unsuitable for ISR use. In any case, my application is perfectly fine with just calling them periodically from the main context."}}