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')
registry.put({api: self._components.filesProviders['browser'], name: 'fileproviders/browser'})
var remixd = new Remixd(65520)
registry.put({api: remixd, name: 'remixd'})
remixd.event.register('system', (message) => {
if (message.error) toolTip(message.error)
})
// var remixd = new Remixd(65520)
// registry.put({api: remixd, name: 'remixd'})
// remixd.event.register('system', (message) => {
// 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, name: 'fileproviders'})

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

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

Loading…
Cancel
Save