{"id":16913630,"url":"https://github.com/extrawurst/sockjs-unity3d-xhr-example","last_synced_at":"2026-05-17T13:02:10.777Z","repository":{"id":13184664,"uuid":"15868104","full_name":"extrawurst/sockjs-unity3d-xhr-example","owner":"extrawurst","description":"usage examples of sockjs-unity3d-xhr lib","archived":false,"fork":false,"pushed_at":"2014-01-13T13:20:39.000Z","size":180,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-25T21:13:12.701Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","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/extrawurst.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":"2014-01-13T12:55:59.000Z","updated_at":"2016-06-22T03:27:26.000Z","dependencies_parsed_at":"2022-08-30T14:41:59.186Z","dependency_job_id":null,"html_url":"https://github.com/extrawurst/sockjs-unity3d-xhr-example","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/extrawurst%2Fsockjs-unity3d-xhr-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/extrawurst%2Fsockjs-unity3d-xhr-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/extrawurst%2Fsockjs-unity3d-xhr-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/extrawurst%2Fsockjs-unity3d-xhr-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/extrawurst","download_url":"https://codeload.github.com/extrawurst/sockjs-unity3d-xhr-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244717362,"owners_count":20498283,"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-10-13T19:14:15.689Z","updated_at":"2026-05-17T13:02:10.690Z","avatar_url":"https://github.com/extrawurst.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"sockjs-unity3d-xhr\n==================\n\nsockjs client implementation for unity3D using xhr polling (so this works with unity free license).\njust import https://github.com/Extrawurst/sockjs-unity3d-xhr (for example as a submodule) and see the usage example below or the example unity project in this repo.\n\n==================\nUsage\n==================\n\nFor a more complex example see the chat server/client in nodejs and unity in the source code.\nSee the https://github.com/sockjs/sockjs-node sockjs documentation for details on the server implementation.\n\nSimple usage example:\n\n```\npublic class Client : MonoBehaviour {\n\n\tpublic SockjsClient sockjs = new SockjsClient();\n\t\n\tpublic void Start()\n\t{\n\t\tsockjs.OnMessage += OnMessage;\n\t\tsockjs.OnConnect += OnConnect;\n\t\t\n\t\t// connect to wherever your server is running\n\t\tsockjs.Connect(\"http://localhost:9999/echo/\");\n\t}\n\n\tprivate void OnMessage(string _msg)\n\t{\n\t\t// got message\n\t\tDebug.Log(_msg);\n\t}\n\n\tprivate void OnConnect()\n\t{\n\t\tDebug.Log(\"connected\");\n\t\t\n\t\tsockjs.SendData(\"hello world\");\n\t}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fextrawurst%2Fsockjs-unity3d-xhr-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fextrawurst%2Fsockjs-unity3d-xhr-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fextrawurst%2Fsockjs-unity3d-xhr-example/lists"}