Comments (4)
There were a couple missing functions that socket.io needs (get/set headers, clearTimeout).
I implemented those in the develop/fix-socket-io and I got the chat sample working with this code:
var serverIP = 'http://127.0.0.1';
var messagePort = '3000';
var socket = io.connect(serverIP + ':' + messagePort);
socket.on('chat message', function (msg) {
console.log(data);
});
Can you please give it a try and let me know if it works for you?
from holojs.
Is socket.io using WebSockets? Is yes, then there's some work to be done to implement support for them in the native layer. If not, then this could be an easy fix in the XHR implementation.
from holojs.
Partially.
"Note: Socket.IO is not a WebSocket implementation. Although Socket.IO indeed uses WebSocket as a transport when possible, it adds some metadata to each packet: the packet type, the namespace and the ack id when a message acknowledgement is needed. That is why a WebSocket client will not be able to successfully connect to a Socket.IO server, and a Socket.IO client will not be able to connect to a WebSocket server (like ws://echo.websocket.org) either. Please see the protocol specification here."
from https://github.com/socketio/socket.io/
Socket IO protocol:
https://github.com/socketio/socket.io-protocol
from holojs.
In app.js, when I run
var serverIP = 'http://127.0.0.1'; // This should be the IP address that's assigned by your router
var messagePort = '8000';
console.log(serverIP);
var socket = io(serverIP + ':' + messagePort);
I got the message from Output window in Visual Studio 2015:
log: http://10.100.200.104
Exception thrown at 0x77062502 in threejsapp.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x01EC9CA4.
'threejsapp.exe' (Win32): Loaded 'C:\Windows\System32\urlmon.dll'. Symbols loaded.
'threejsapp.exe' (Win32): Loaded 'C:\Windows\System32\mlang.dll'. Symbols loaded.
Exception thrown at 0x77062502 in threejsapp.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x01ECCCC4.
Exception thrown at 0x77062502 in threejsapp.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x01EC99BC.
Failure in file c:\users\bryanbo.cao\documents\repos\ar-collaboration\src\holojs\holojs\holojshost\objectevents.h, line 52
Failure in file c:\users\bryanbo.cao\documents\repos\ar-collaboration\src\holojs\holojs\holojshost\windowelement.cpp, line 149
Failure in file c:\users\bryanbo.cao\documents\repos\ar-collaboration\src\holojs\holojs\holojshost\windowelement.cpp, line 149
Failure in file c:\users\bryanbo.cao\documents\repos\ar-collaboration\src\holojs\holojs\holojshost\windowelement.cpp, line 149
Failure in file c:\users\bryanbo.cao\documents\repos\ar-collaboration\src\holojs\holojs\holojshost\windowelement.cpp, line 149
Failure in file c:\users\bryanbo.cao\documents\repos\ar-collaboration\src\holojs\holojs\holojshost\windowelement.cpp, line 149
But on the server which is running on another laptop, I could see that a new client was connected.
from holojs.
Related Issues (20)
- Spatial Understanding HOT 4
- OpenGL and EGL includes are not found when trying to build the solution. HOT 3
- Release mode HOT 2
- Access violation when accessing HoloLens camera HOT 3
- Windows Universal Runtime version 10.0.16299.0 HOT 1
- Spatial anchor read access violation HOT 2
- XmlHttpRequest exception when remote HTTP server is not online HOT 1
- Repetitive Object load causing memory leak HOT 1
- HTTP Requests within HoloJS?!?! HOT 3
- Different Origin when Space was lost for a moment
- Windows 10 build 17720 breaks HoloJs Spatial Input HOT 2
- FPS drops when calling dispose() in requestAnimationFrame()
- Is there a possibility to use Three GLTFLoader? HOT 2
- It There a way to check voice without specifying commands? HOT 4
- How to use video texture in HoloJS ?
- Access to RGB camera using Spin app HOT 5
- Immersive Mode
- Sample projects unresponsive to gestures. HOT 2
- HoloJS with HoloLens 2 HOT 7
- This repo is missing important files HOT 2
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 holojs.