a ruby websocket proxy sample app/implementation
Clone or download
Latest commit 6a57cec Aug 27, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib initial commit Aug 27, 2017
log initial commit Aug 27, 2017
tmp initial commit Aug 27, 2017
.gitignore update readme Aug 27, 2017
Gemfile initial commit Aug 27, 2017
Gemfile.lock initial commit Aug 27, 2017
Readme.md update readme Aug 27, 2017
config.yml initial commit Aug 27, 2017
em-test-client.rb initial commit Aug 27, 2017
em-ws-unity-proxy.rb initial commit Aug 27, 2017
env.rb initial commit Aug 27, 2017
package.json initial commit Aug 27, 2017
run initial commit Aug 27, 2017

Readme.md

EM-WS-Proxy

or more specifically - EM-WS-Unity-Proxy

This is a ruby websocket proxy sample app I developed to proxy websocket requests from blockchain.info to an unity 3d project

You can find the Unity 3d project in github: makevoid/block_explorer_vr


Prerequisites

Ruby 2+ and bundler installed (gem i bundler)

Rerun

gem i rerun

Install

bundle

Run

rerun bundle exec ruby em-ws-unity-proxy.rb

This will start a Websocket proxy on localhost:8080

Unity code

You can find some unity websocket client sample code in tmp/unity_example.cs

Bare in mind you have to add to your plugins this dependency (websocket-sharp.dll - DLL) - https://github.com/sta/websocket-sharp

You'll need to compile it with Visual Studio and then patch it -

search for an error on a line that contains a call to Cubemap.CreateExternalTexture

patch it by replacing the original line with this line:

et = Cubemap.CreateExternalTexture(size.w, txFormat, mipLevels > 1, externalTex);

enjoy!

makevoid