{"action":"created","issue":{"url":"https://api.github.com/repos/noflo/noflo/issues/356","labels_url":"https://api.github.com/repos/noflo/noflo/issues/356/labels{/name}","comments_url":"https://api.github.com/repos/noflo/noflo/issues/356/comments","events_url":"https://api.github.com/repos/noflo/noflo/issues/356/events","html_url":"https://github.com/noflo/noflo/pull/356","id":125778412,"number":356,"title":"IP objects","user":{"login":"trustmaster","id":778655,"avatar_url":"https://avatars.githubusercontent.com/u/778655?v=3","gravatar_id":"","url":"https://api.github.com/users/trustmaster","html_url":"https://github.com/trustmaster","followers_url":"https://api.github.com/users/trustmaster/followers","following_url":"https://api.github.com/users/trustmaster/following{/other_user}","gists_url":"https://api.github.com/users/trustmaster/gists{/gist_id}","starred_url":"https://api.github.com/users/trustmaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trustmaster/subscriptions","organizations_url":"https://api.github.com/users/trustmaster/orgs","repos_url":"https://api.github.com/users/trustmaster/repos","events_url":"https://api.github.com/users/trustmaster/events{/privacy}","received_events_url":"https://api.github.com/users/trustmaster/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-09T20:10:13Z","updated_at":"2016-01-23T19:04:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/noflo/noflo/pulls/356","html_url":"https://github.com/noflo/noflo/pull/356","diff_url":"https://github.com/noflo/noflo/pull/356.diff","patch_url":"https://github.com/noflo/noflo/pull/356.patch"},"body":"This is the implementation of #290 on port and socket level.\r\n\r\nFor example use in components see 2 test cases here: https://github.com/trustmaster/noflo/blob/ip-objects/spec/Component.coffee#L212\r\n\r\nI had to pick some new method names to keep the old API fully available.\r\n\r\nThe `InPort` [maintains](https://github.com/trustmaster/noflo/blob/ip-objects/spec/InPort.coffee#L263) compatibility layer between the old raw packets with 7 event types and the new object packets with 1 event type. So the old-style components can be combined with new-style components within the same graph.\r\n\r\nI've added [`InternalSocket.post()`](https://github.com/trustmaster/noflo/blob/ip-objects/src/lib/InternalSocket.coffee#L93) method because connect/disconnect events are now considered as optional. This is to avoid the annoying `disconnect()` every time you just want to send a single packet, and to avoid littering the compatibility layer with unnecessary `openBracket/closeBracket` packets.\r\n\r\nComments and suggestions are welcome.\r\n\r\n### TODO\r\n\r\n - [ ] Describe packet cloning use cases\r\n - [ ] Improve/implement cloning interfaces and underlying code\r\n - [ ] Add `IP.toString()` method providing as much sensitive debug information as possible"},"comment":{"url":"https://api.github.com/repos/noflo/noflo/issues/comments/174212792","html_url":"https://github.com/noflo/noflo/pull/356#issuecomment-174212792","issue_url":"https://api.github.com/repos/noflo/noflo/issues/356","id":174212792,"user":{"login":"trustmaster","id":778655,"avatar_url":"https://avatars.githubusercontent.com/u/778655?v=3","gravatar_id":"","url":"https://api.github.com/users/trustmaster","html_url":"https://github.com/trustmaster","followers_url":"https://api.github.com/users/trustmaster/followers","following_url":"https://api.github.com/users/trustmaster/following{/other_user}","gists_url":"https://api.github.com/users/trustmaster/gists{/gist_id}","starred_url":"https://api.github.com/users/trustmaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trustmaster/subscriptions","organizations_url":"https://api.github.com/users/trustmaster/orgs","repos_url":"https://api.github.com/users/trustmaster/repos","events_url":"https://api.github.com/users/trustmaster/events{/privacy}","received_events_url":"https://api.github.com/users/trustmaster/received_events","type":"User","site_admin":false},"created_at":"2016-01-23T19:04:38Z","updated_at":"2016-01-23T19:04:38Z","body":"Added checklist in the opening post.\r\n\r\nI need some help identifying use cases for cloning packets vs. passing by reference."}}