Websocket client requests

uiCheck
ioedeveloper 5 years ago committed by yann300
parent a99c0baf73
commit c041163f68
  1. 12
      src/app.js
  2. 2
      src/app/files/remixDProvider.js
  3. 7
      src/app/files/remixd-handle.js

@ -147,13 +147,13 @@ class App {
self._components.filesProviders['browser'] = new FileProvider('browser') self._components.filesProviders['browser'] = new FileProvider('browser')
registry.put({api: self._components.filesProviders['browser'], name: 'fileproviders/browser'}) registry.put({api: self._components.filesProviders['browser'], name: 'fileproviders/browser'})
var remixd = new Remixd(65520) // var remixd = new Remixd(65520)
registry.put({api: remixd, name: 'remixd'}) // registry.put({api: remixd, name: 'remixd'})
remixd.event.register('system', (message) => { // remixd.event.register('system', (message) => {
if (message.error) toolTip(message.error) // if (message.error) toolTip(message.error)
}) // })
self._components.filesProviders['localhost'] = new RemixDProvider(remixd, self.appManager) self._components.filesProviders['localhost'] = new RemixDProvider(self.appManager)
registry.put({api: self._components.filesProviders['localhost'], name: 'fileproviders/localhost'}) registry.put({api: self._components.filesProviders['localhost'], name: 'fileproviders/localhost'})
registry.put({api: self._components.filesProviders, name: 'fileproviders'}) registry.put({api: self._components.filesProviders, name: 'fileproviders'})

@ -192,7 +192,7 @@ module.exports = class RemixDProvider {
} }
} }
function remixapi (remixd, self) { function remixapi (appManager, self) {
const read = (path, callback) => { const read = (path, callback) => {
path = '' + (path || '') path = '' + (path || '')
path = pathtool.join('./', path) path = pathtool.join('./', path)

@ -21,7 +21,7 @@ var css = csjs`
const profile = { const profile = {
name: 'remixd', name: 'remixd',
url: 'ws://127.0.0.1:65520', url: 'ws://127.0.0.1:65520',
methods: ['folderIsReadOnly'], methods: ['folderIsReadOnly', 'resolveDirectory'],
events: [], events: [],
description: 'Using Remixd daemon, allow to access file system', description: 'Using Remixd daemon, allow to access file system',
kind: 'other', kind: 'other',
@ -43,8 +43,7 @@ export class RemixdHandle extends WebsocketPlugin {
}) })
} }
async activate () { activate () {
await super.activate()
this.connectToLocalhost() this.connectToLocalhost()
} }
@ -58,7 +57,7 @@ export class RemixdHandle extends WebsocketPlugin {
* *
* @param {String} txHash - hash of the transaction * @param {String} txHash - hash of the transaction
*/ */
connectToLocalhost () { async connectToLocalhost () {
let connection = (error) => { let connection = (error) => {
if (error) { if (error) {
console.log(error) console.log(error)

Loading…
Cancel
Save