XRPLF / xrpl.js

A JavaScript/TypeScript API for interacting with the XRP Ledger in Node.js and the browser
https://xrpl.org/
1.2k stars 511 forks source link

RippleAPI server should support unix socket #939

Closed smsunarto closed 5 years ago

smsunarto commented 6 years ago

ripple-lib seems to only work with ws:// and wss://

It should support ws+unix:// too.

intelliot commented 6 years ago

What is ws+unix:// and how is it different from ws://?

smsunarto commented 6 years ago

@intelliot it's for websocket through unix socket

ex: ws+unix:///tmp/server.sock

node.js ws library already supports it https://github.com/websockets/ws/blob/master/doc/ws.md so I think it would be sensical for ripple-lib to also support it by default.

smsunarto commented 6 years ago

@intelliot I've confirmed that ws+unix:// actually works out of the box with ripple-lib, you just need to update your regex validator here https://github.com/ripple/ripple-lib/blob/develop/src/common/schemas/input/api-options.json

intelliot commented 6 years ago

Thank you. Would you like to open a PR?

smsunarto commented 6 years ago

Yes, will do that later today. Thanks.