Skip to content

Latest commit

 

History

History
41 lines (34 loc) · 1.01 KB

README.md

File metadata and controls

41 lines (34 loc) · 1.01 KB

mumble-client-websocket

This module provides the websocket transport protocol for the mumble-client module for use in both Nodejs and the browser.

Usage

Node-style callback:

var connect = require('mumble-client-websocket')
connect('wss://example.com:64737', {
  username: 'Test',
  password: 'Pass123'
}, function (err, client) {
  if (err) throw err;

  // Connection established
  console.log('Welcome message:', client.welcomeMessage)
  console.log('Actual username:', client.self.username)
})

Promise:

var connect = require('mumble-client-websocket')
connect('wss://example.com:64737', {
  username: 'Test',
  password: 'Pass123'
}).done(function (client) {
  // Connection established
  console.log('Welcome message:', client.welcomeMessage)
  console.log('Actual username:', client.self.username)
}, function(err) {
  console.log('Connection failed:', err)
})

License

MIT