Skip to content
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

socket.address is not a function #129

Open
cracker0dks opened this issue Apr 17, 2018 · 2 comments
Open

socket.address is not a function #129

cracker0dks opened this issue Apr 17, 2018 · 2 comments

Comments

@cracker0dks
Copy link

Hey, I'm testing the basic examples from example folder and get this on every connection I try:

/home/test/node_modules/sip/sip.js:626
local = {address: ws._socket.address().address, port: ws._socket.address().port},
                            ^
TypeError: ws._socket.address is not a function

if I console log ws._socket ill get:

{ remotePort: 56322,
  remoteAddress: '::ffff:192.168.0.5',
  remoteFamily: 'IPv6' }

Why is their no address function? Do I miss something?

Node Version: 8.11.1
OS: Debian 9

@latysheff
Copy link

As a temporary solution try to change web sockets module in sip.js from 'uws' back to 'ws':
var WebSocket = require('ws');

@cracker0dks
Copy link
Author

yep, no error anymore! Thanks :)

latysheff added a commit to latysheff/sip.js that referenced this issue Jun 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants