{"action":"created","issue":{"url":"https://api.github.com/repos/code-dot-org/code-dot-org/issues/1982","labels_url":"https://api.github.com/repos/code-dot-org/code-dot-org/issues/1982/labels{/name}","comments_url":"https://api.github.com/repos/code-dot-org/code-dot-org/issues/1982/comments","events_url":"https://api.github.com/repos/code-dot-org/code-dot-org/issues/1982/events","html_url":"https://github.com/code-dot-org/code-dot-org/pull/1982","id":67226519,"number":1982,"title":"NetSim: Support Peer-to-Peer Connections","user":{"login":"islemaster","id":1615761,"avatar_url":"https://avatars.githubusercontent.com/u/1615761?v=3","gravatar_id":"","url":"https://api.github.com/users/islemaster","html_url":"https://github.com/islemaster","followers_url":"https://api.github.com/users/islemaster/followers","following_url":"https://api.github.com/users/islemaster/following{/other_user}","gists_url":"https://api.github.com/users/islemaster/gists{/gist_id}","starred_url":"https://api.github.com/users/islemaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/islemaster/subscriptions","organizations_url":"https://api.github.com/users/islemaster/orgs","repos_url":"https://api.github.com/users/islemaster/repos","events_url":"https://api.github.com/users/islemaster/events{/privacy}","received_events_url":"https://api.github.com/users/islemaster/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-04-08T21:43:29Z","updated_at":"2015-04-09T18:35:18Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/1982","html_url":"https://github.com/code-dot-org/code-dot-org/pull/1982","diff_url":"https://github.com/code-dot-org/code-dot-org/pull/1982.diff","patch_url":"https://github.com/code-dot-org/code-dot-org/pull/1982.patch"},"body":"Up until now, NetSim has been about connecting to a router.  This PR makes it possible to connect directly to another client node, and send messages back and forth.\r\n\r\n![out](https://cloud.githubusercontent.com/assets/1615761/7055946/b9e02ff2-ddfc-11e4-935d-6810d548bd17.gif)\r\n\r\nBecause the lobby was the first part of NetSim I wrote, it was a little painful to work with and I did a lot of refactoring.  Big positive changes there:\r\n* Actual reuse of `NetSimPanel`\r\n* The whole lobby interface is now safe to re-render any time.\r\n* Separation and cleanup of shard selection from remote node selection.\r\n\r\nAnother major change here is that I've removed `NetSimConnection` entirely.  Its role was always a little unclear.  The core `NetSim` class inherited most of its functionality, detecting changes to connection status and triggering related re-rendering.\r\n\r\nThere's a new levelbuilder control here: You can make a node type (routers, clients) visible in the lobby but not connectable.  Not super useful, but included for completeness."},"comment":{"url":"https://api.github.com/repos/code-dot-org/code-dot-org/issues/comments/91321751","html_url":"https://github.com/code-dot-org/code-dot-org/pull/1982#issuecomment-91321751","issue_url":"https://api.github.com/repos/code-dot-org/code-dot-org/issues/1982","id":91321751,"user":{"login":"islemaster","id":1615761,"avatar_url":"https://avatars.githubusercontent.com/u/1615761?v=3","gravatar_id":"","url":"https://api.github.com/users/islemaster","html_url":"https://github.com/islemaster","followers_url":"https://api.github.com/users/islemaster/followers","following_url":"https://api.github.com/users/islemaster/following{/other_user}","gists_url":"https://api.github.com/users/islemaster/gists{/gist_id}","starred_url":"https://api.github.com/users/islemaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/islemaster/subscriptions","organizations_url":"https://api.github.com/users/islemaster/orgs","repos_url":"https://api.github.com/users/islemaster/repos","events_url":"https://api.github.com/users/islemaster/events{/privacy}","received_events_url":"https://api.github.com/users/islemaster/received_events","type":"User","site_admin":false},"created_at":"2015-04-09T18:35:18Z","updated_at":"2015-04-09T18:35:18Z","body":"Okay, made the requested visualization change: The remote node isn't pulled into the foreground until a mutual connection is established.  Here's an updated screencast:\r\n\r\n![out](https://cloud.githubusercontent.com/assets/1615761/7074032/76bb28ca-deac-11e4-9a4a-a3ab4a304efd.gif)\r\n"}}