{"id":13743699,"url":"https://github.com/palkan/as3_p2plocal","last_synced_at":"2026-01-07T01:43:04.972Z","repository":{"id":10222000,"uuid":"12320539","full_name":"palkan/as3_p2plocal","owner":"palkan","description":"as3 lib for local p2p connections (serverless rtmfp)","archived":false,"fork":false,"pushed_at":"2018-05-07T16:33:22.000Z","size":337,"stargazers_count":25,"open_issues_count":0,"forks_count":6,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-02-02T03:28:01.292Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"ActionScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/palkan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-08-23T10:38:15.000Z","updated_at":"2022-07-14T12:30:51.000Z","dependencies_parsed_at":"2022-08-31T08:01:30.279Z","dependency_job_id":null,"html_url":"https://github.com/palkan/as3_p2plocal","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palkan%2Fas3_p2plocal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palkan%2Fas3_p2plocal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palkan%2Fas3_p2plocal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palkan%2Fas3_p2plocal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/palkan","download_url":"https://codeload.github.com/palkan/as3_p2plocal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245954643,"owners_count":20699872,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T05:00:55.197Z","updated_at":"2026-01-07T01:43:04.945Z","avatar_url":"https://github.com/palkan.png","language":"ActionScript","funding_links":[],"categories":["Networking"],"sub_categories":["P2P"],"readme":"AS3 local RTMFP connections library\n----------\n\n### Features:\n\n* Create new local net group with just one call using config Object\n* Message types\n* Direct routing (peer-to-peer send message)\n* Automatically restore session state (if there is at least one another peer in the group)\n\nExamples: [http://palkan.github.io/as3_p2plocal/examples/index.html](http://palkan.github.io/as3_p2plocal/examples/index.html)\n\n### Usage\n\n```actionscript\n\n// ---------- init ------------//\n\np2p_client = new P2PClient();        //create new instance\n\np2p_client.addEventListener(P2PEvent.CONNECTED, onConnect);              // add listener for 'connect' event: it means connection established and you are connected to NetGroup; if you don't need to restore a state - that's enough\np2p_client.addEventListener(P2PEvent.STATE_RESTORED, onStateRestored);   // add listener for 'state_restored' event: it means all previously dispatched messages within the group has been received and ready to be parsed;\n\np2p_client.listen(messageReceived, \"message\");   // add listener for messages of a type \"message\"\n\np2p_client.connect(new P2PConfig({\n                groupName: \"example\",      // NetGroup name\n                saveState: \"true\"          // restore state from previous messages\n            }));\n\n//------------- state restored ---------//\n\nfunction onStateRestored(e:P2PEvent):void {\n    // e.info.state contains an Array of messages\n        }\n\n//------------ receive messages --------//\n\nfunction messageReceived(p:P2PPacket):void{\n  // handle message; p.data contains data was sent\n}\n\n//------------ send messages ----------//\n\np2p_client.send(data, type(=\"default\"), system (=true), recipient(=\"\");\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpalkan%2Fas3_p2plocal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpalkan%2Fas3_p2plocal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpalkan%2Fas3_p2plocal/lists"}