Skip to content

Switch to nativescript-socketio library #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ module.exports = function install(Vue, {debug = false, host = null, port = 8098}
showToast: (message) => require('nativescript-toast').makeText(message).show(),
io() {
const address = `http://${getServerIpAddress(host, port)}`
const SocketIO = require('nativescript-socket.io')
debug && SocketIO.enableDebug()
return SocketIO.connect(address)
const SocketIO = require('nativescript-socketio').SocketIO
let socketIO = new SocketIO(address, { debug: debug })
socketIO.connect()
return socketIO
}
})

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"homepage": "https://github.com/nativescript-vue/nativescript-vue-devtools#readme",
"peerDependencies": {
"nativescript-toast": "*",
"nativescript-socket.io": "*",
"nativescript-socketio": "*",
"tns-core-modules": "*",
"@vue/devtools": "*"
}
Expand Down