Comments (5)
Hey Ken,
You'll have to edit the server and client side code to recognize those
messages. If you'll notice, we switch on the message type to decide how to
process the message on both sides. Since SUCCESS is not yet a recognized
type, you're getting that message.
Michelle
On Tue, Dec 10, 2013 at 12:16 AM, Ken OKABE [email protected]:
Hi,
basically, I'd like to implement AUTH bootstrap in server.js
PeerServer.prototype._initializeWSS
such asif (true) // true for auth passed
{
socket.send(JSON.stringify(
{
type: 'SUCCESS',
payload:
{
msg: id + ': Authorizaton Success'
}
}));f(); // go on the rest } else { socket.send(JSON.stringify( { type: 'ERROR', payload: { msg: id + ': Authorizaton Failed' } })); socket.close(); return; }
However, in this sample, I tried
type: 'SUCCESS'
and which is unrecognized message at client side.
WARNING You received an unrecognized message: [object Object]Having googled for a while to find definition of the type, I could not
find them.
All the type I can find in the server.js code is
type: 'ERROR',
type: 'ID-TAKEN',
and
type: 'OPEN'
seems to do nothing.I need to grab a server status for my own implementation in the context of
the Connection status:
http://cdn.peerjs.com/demo/chat.htmlHow can we do this??
I've read
#10 #10
by the way, but no clue.
Thanks.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/28
.
from peerjs-server.
Michelle,
Thanks for reply.
I investigated only in server side, but found where to tweak in client side.
https://github.com/peers/peerjs/blob/master/lib/peer.js
Thanks!
from peerjs-server.
https://github.com/peers/peerjs/blob/master/lib/peer.js#L146
That should be what you're looking for! Good luck.
Michelle
On Tue, Dec 10, 2013 at 12:48 PM, Ken OKABE [email protected]:
Michelle,
Thanks for reply.
I investigated only in server side, but found where to tweak in client
side.https://github.com/peers/peerjs/blob/master/lib/peer.js
Thanks!
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/28#issuecomment-30266348
.
from peerjs-server.
Thanks again, Michelle.
peer.js is one of the best project around.
Just in case you haven't noticed, one of the major mobile company in Japan - NTT Communications has employed your project.
http://www.us.ntt.com/en/index.html
https://github.com/nttcom
https://github.com/nttcom/peerjs
http://nttcom.github.io/skyway/
Keep up the good work!
from peerjs-server.
Thanks for using us! :)
Michelle
On Tue, Dec 10, 2013 at 2:33 PM, Ken OKABE [email protected] wrote:
Thanks again, Michelle.
peer.js is one of the best project around.
Just in case you haven't noticed, one of the major mobile company in Japan
- NTT Communications has employed your project.
http://www.us.ntt.com/en/index.html
https://github.com/nttcom
https://github.com/nttcom/peerjsKeep up the good work!
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/28#issuecomment-30275281
.
from peerjs-server.
Related Issues (20)
- migrate from localhost to shared hosting
- Combine a peer server with nestjs application
- Back4App - Was Working - Now Stopped HOT 1
- Unnecessary high CPU impact due to low default check interval of broken connections HOT 1
- cannot start server on ubuntu vm
- ssl failed HOT 1
- TypeError: (0 , $cl6Iw$ws.WebSocketServer) is not a constructor HOT 3
- Error: unexpected token . HOT 3
- RedisClient error: ConnectionTimeoutError: Connection timeout
- custom domain in local dev with https enable
- Deploying peerjs server HOT 4
- TURN servers down? HOT 3
- connection.on('dataChunk',(dataChunk)=>{})
- Status page is not working HOT 1
- Client-Initiated SSL Renegotiation Permitted HOT 4
- TURN servers unavailable?? HOT 3
- New maintainer(s) wanted!
- Google App Engine Deployment in Readme is not Right: HOT 1
- Dependency Dashboard
- Support multiple Docker image architectures
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from peerjs-server.