{"id":19562465,"url":"https://github.com/inpassor/jquery-realplexor","last_synced_at":"2026-02-23T03:54:20.814Z","repository":{"id":58245604,"uuid":"70623775","full_name":"Inpassor/jquery-realplexor","owner":"Inpassor","description":"Realplexor jQuery API","archived":false,"fork":false,"pushed_at":"2017-02-07T18:19:18.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-09T00:18:24.552Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Inpassor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-11T18:33:25.000Z","updated_at":"2017-02-05T15:42:50.000Z","dependencies_parsed_at":"2022-08-31T04:22:59.758Z","dependency_job_id":null,"html_url":"https://github.com/Inpassor/jquery-realplexor","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inpassor%2Fjquery-realplexor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inpassor%2Fjquery-realplexor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inpassor%2Fjquery-realplexor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inpassor%2Fjquery-realplexor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Inpassor","download_url":"https://codeload.github.com/Inpassor/jquery-realplexor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240822590,"owners_count":19863302,"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-11-11T05:14:42.876Z","updated_at":"2025-10-25T19:41:18.413Z","avatar_url":"https://github.com/Inpassor.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"Realplexor jQuery API\n=====================\n\nAuthor: Inpassor \u003cinpassor@yandex.com\u003e\n\nGitHub repository: https://github.com/Inpassor/jquery-realplexor\n\nThis library is the jQuery plugin that implements\n[Dklab_Realplexor](https://github.com/DmitryKoterov/dklab_realplexor)\nJavaScript API.\n\nDklab_Realplexor is comet server which handles 1000000+ parallel\nbrowser connections.\n\nThis library acts similar to native Dklab_Realplexor JavaScript API,\nbut have one difference: IFRAME is not used. So all the Dklab_Realplexor\nserver config parameters related to JavaScript should be declared on\nclient-side.\nIt is made to eliminate all the unnecessary dancing with a tambourine\nfor just getting these parameters, and no other targets.\n\nAlso all the deprecated \"work-arounds\" are removed and native\nJavaScript functions replaced by jQuery's ones.\n\n## Installation\n\nNote that here is information about install this library, not\nDklab_Realplexor server itself. To install Dklab_Realplexor server\nfollow the instructions on\n[Dklab_Realplexor GitHub repository](https://github.com/DmitryKoterov/dklab_realplexor).\n\n### Using bower:\n\n```\nbower install inpassor-jquery-realplexor\n```\n\n### Using composer asset plugin:\n\n```\ncomposer require bower-asset/inpassor-jquery-realplexor\n```\n\n## Usage\n\nTo create Realplexor instance just call $.Realplexor(parameters) : \n```\nvar realplexor = $.Realplexor({\n    url: '//rpl.yourdomain.com'\n});\n```\nNote that **url** must be valid URL, that jQuery.ajax function accept. \n\nThe list of available parameters:\n\nParameter | Default | Description\n--- | --- | ---\n**uid** | random string | The unique string indentifier of the Realplexor instance.\n**url** | \"\" |The URL of Dklab_Realplexor server.\n**namespace** | \"\" | The namespace to use.\n**JS_WAIT_RECONNECT_DELAY** | 0.1 | The reconnect delay. \n**JS_WAIT_TIMEOUT** | 300 | The timeout in seconds to wait Dklab_Realplexor responce.\n**JS_WAIT_URI** | \"/\" | What URI is used to access realplexor.\n\nIf the parameter **uid** is given, you can call the corresponding\nRealplexor instance later by such way:\n```\nvar realplexor = $.Realplexor('myUID');\n```\n\nOnce created Realplexor instance you can call its methods to work with\nDklab_Realplexor server channels: \n\nMethod | Description\n--- | ---\n**setCursor** | **setCursor(id, cursor)** . Set a cursor to a channel.\n**subscribe** | **subscribe(id[, callback])** . Subscribe a callback to a channel.\n**unsubscribe** | **unsubscribe(id[, callback])** . Unsubscribe a callback from a channel. If parameter **callback** is not given, all the callbacks will be unsubscribed from a channel.\n**execute** | **execute()** . This method should be called after all the subscribe / unsubscribe calls.\n\nThe **id** of a channel is alpha-numeric string.\n\nThe **cursor** is the monotonically increasing sequence.\n\nThe **callback** declaration should be as follows:\n```\nsomeFunction(data, id, cursor) {\n    ...\n}\n```\nWhen Dklab_Realplexor sends data to a channel, the **callback** will be\ncalled with these parameters: \n\nParameter | Description\n--- | ---\n**data** | A data received to a channel. \n**id** | The id of a channel.\n**cursor** | The current cursor of a channel.\n\n## Example\n\nCreate Realplexor instance, set cursors to \"0\" and subscribe to\nchannels \"Alpha\" and \"Beta\":\n```\nvar AlphaCallback = function (data, id, cursor) {\n    console.log(data, id, cursor);\n};\n\nvar BetaCallback = function (data, id, cursor) {\n    console.log(data, id, cursor);\n};\n\n$.Realplexor({\n    url: '//rpl.yourdomain.com'\n})\n    .setCursor('Alpha', 0).subscribe('Alpha', AlphaCallback)\n    .setCursor('Beta', 0).subscribe('Beta', BetaCallback)\n    .execute();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finpassor%2Fjquery-realplexor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finpassor%2Fjquery-realplexor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finpassor%2Fjquery-realplexor/lists"}