Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27131] TiAPI: Create Node-compatible ws module API

GitHub Issuen/a
TypeNew Feature
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsTiAPI
Labelsn/a
ReporterChristopher Williams
AssigneeJan Vennemann
Created2019-06-05T08:47:30.000+0000
Updated2019-07-29T14:41:11.000+0000

Description

Although the [ws](https://www.npmjs.com/package/ws) module is no core module, it is widely used and would make it way easier to implement a couple of upcoming cross-platform features like hot reloading for Angular and Vue or out of the box support for real time libraries like pusher or socket.io. The ws module itself depends on a lot of core modules like http, net and ssl which are one of the most complex ones, so it is probably easier to make use of our already existing socket API for the implementation. https://github.com/websockets/ws Some of the ws module - specifically the ws client - could be implemented using our existing https://docs.appcelerator.com/platform/latest/#!/api/Titanium.Network.Socket.TCP

Comments

  1. Christopher Williams 2019-07-29

    Looking at the ws module, it requires all the following linked core node modules. Some may be test-only, so this list may be over-long. But suffice it to say, this is a module that requires a lot of existing work to already be done. But as Jan notes, it may be possible to re-implemet a copy of this ourselves that cheats and uses our httpclient - or even the web socket client that is baked in to our libraries for a platform like Android (we use web sockets to do the debugger)

JSON Source