# \[Plugin\] Socket.io Client

**URL:** <https://forums.unrealengine.com/t/plugin-socket-io-client/63803>\
**Category:** C++\
**Tags:** unreal-engine, Engine-Source-Code, GitHub\
**Created:** [May 14, 2016, 1:21am UTC](https://forums.unrealengine.com/t/plugin-socket-io-client/63803 "2016-05-14T01:21:21Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![getnamo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/getnamo/32/1194624_2.png) [@getnamo](https://forums.unrealengine.com/u/getnamo)\
**Post date:** [May 14, 2016, 1:21am UTC](https://forums.unrealengine.com/t/plugin-socket-io-client/63803/1 "2016-05-14T01:21:21Z")

</div>

[Socket.io](http://socket.io/) is a performant real-time bi-directional communication library. There are two parts, the server written in node.js and the client typically javascript for the web. There are alternative client implementations and I’ve used the [C++ client library](https://github.com/socketio/socket.io-client-cpp) and ported it to UE4.

For the [London is Unreal](http://www.meetup.com/London-Unreal-Engine-Meetup/) meetup I made a presentation on the topic of plugins and chose to implement a useful plugin live during the presentation. A [socket.io](http://socket.io) client was chosen as the plugin, which was finished with a basic _Connect_, _Bind_, _Emit_ functions and an _On_ event all interfaced through an Actor Component.

Since 0.4, the plugin is pretty feature complete, let me know what other features you think are missing!

**Download**

https://img.shields.io/github/release//socketio-client-ue4.svg

Available at:  
[https://github.com//socketio-client-ue4/releases](https://github.com//socketio-client-ue4/releases)  
or  
[https://www.unrealengine.com/marketp…cket-io-client](https://www.unrealengine.com/marketplace/socket-io-client)

**Resources**  
[Github Repository - Always contains the latest documentation](https://github.com//socketio-client-ue4)  
[Example UMG Chat Project](https://github.com//socketio-client-ue4-example) (contains server and both web and ue4 client)  
[How to connect Unreal Engine 4 to local server via WebSocket using blueprints? - By Egor Bogomyakov](https://medium.com/@slonorib/how-to-connect-unreal-engine-4-to-local-server-via-sockets-9d73fd180f0b)

Example project is a functional UMG based chat window place in world showing real-time communication ability of UE4 -\> Web/Mobile

**Contribute**  
Still missing SSL via openssl [https://github.com//socketio-client-ue4/issues](https://github.com//socketio-client-ue4/issues)

**Quick Install & Setup**

1. [Download Latest Release](https://github.com//socketio-client-ue4/releases)
2. Create new or choose project.
3. Browse to your project folder (typically found at Documents/Unreal Project/{Your Project Root})
4. Copy _Plugins_ folder into your Project root.
5. Restart the Editor and open your project again. Plugin is now ready to use.

**How to use - BP Basics**

Add the SocketIO Client Component to your blueprint actor of choice

http://i.imgur.com/lSkfHQ2.png

Specify your address and port, defaults to localhost (127.0.0.1) at port 3000. Note that since 0.2.0 connect is optional as the component will auto connect unless you disable autoconnect via boolean.

https://camo.githubusercontent.com/eab6a40ab7c42e3f788ba45b36d879856ebf68b9/687474703a2f2f692e696d6775722e636f6d2f645778436d76512e706e67

Call bind for each event you wish the client to subscribe, e.g. ‘chat message’. If you expect to receive events, select your component and in the Details pane press the + to add an ‘OnEvent’ event to your event graph.

Handle this event for your event types, e.g. printing ‘chat message’ event strings.

https://camo.githubusercontent.com/07876d1bdcd2e43fdace023f4d7e16336bde1788/687474703a2f2f692e696d6775722e636f6d2f76566c4e426c782e706e67

If you want to send information to the server, emit events on the SocketIO Client Component, e.g. pressing M to emit a ‘chat message’ string

https://camo.githubusercontent.com/8a717ed3d46ba6b51912051c73ed42c68b18ff0a/687474703a2f2f692e696d6775722e636f6d2f6e69684d53507a2e706e67

**Changelist**

_See latest changes at [https://github.com//socketio-client-ue4/releases](https://github.com//socketio-client-ue4/releases)_

_0.7.0_  
-Compile fixes for 4.18  
-New Plugin scoped memory architecture for reliable and fast FSocketIONative management. Candidate fixes for #44]([https://github.com//socketio-client-ue4/issues/44](https://github.com//socketio-client-ue4/issues/44)), #45]([https://github.com//socketio-client-ue4/issues/45](https://github.com//socketio-client-ue4/issues/45)), #55]([https://github.com//socketio-client-ue4/issues/55](https://github.com//socketio-client-ue4/issues/55)), #56]([https://github.com//socketio-client-ue4/issues/56](https://github.com//socketio-client-ue4/issues/56)), #57]([https://github.com//socketio-client-ue4/issues/57](https://github.com//socketio-client-ue4/issues/57)), #60]([https://github.com//socketio-client-ue4/issues/60](https://github.com//socketio-client-ue4/issues/60)), and #63]([https://github.com//socketio-client-ue4/issues/63](https://github.com//socketio-client-ue4/issues/63)). If you were having any of those problems, try the new plugin and give it a good test. Re-open if issues persist. Architecture merged in as [f17df08](https://github.com//socketio-client-ue4/commit/f17df08192bdebbae0b0cdabe96fe645e27bccc7)  
-New optional fully plugin-scoped connections which remain even through level transitions. Tick bPluginScopedConnection true and ensure your component before and after use the same PluginScopedId. Unless disconnect is manually called these type of connections will only close on app exit.  
-New OnConnectionProblems callback with [verbose signature](https://github.com//socketio-client-ue4/blob/f17df08192bdebbae0b0cdabe96fe645e27bccc7/Source/SocketIOClient/Public/SocketIOClientComponent.h#L12) allowing you to detect when you get disconnected while the [socket.io](http://socket.io) client is still trying to reconnect (default: always trying infinite times). If you wish to change this behavior new parameters have been exposed which control connection attempts and delay.  
-New default toggle bVerboseConnectionLog allows you to quiet your log. Default is true.  
-Blueprint TMap support added! This should be a massive boost to productivity if you used map like data structures. Issue #59]([https://github.com//socketio-client-ue4/issues/59](https://github.com//socketio-client-ue4/issues/59)) fix merged in [f640f63](https://github.com//socketio-client-ue4/commit/f640f639a019f73f6068c16aba23104210ecb8fd)  
-Auto-conversion for As String if string type not supplied. Issue #64]([https://github.com//socketio-client-ue4/issues/64](https://github.com//socketio-client-ue4/issues/64)) merged in [2b118c4](https://github.com//socketio-client-ue4/commit/2b118c4ca27eef923b93dc15f97fca00fd448753)  
-Direct convenience function binds added. This allows you to bind an event or callback to a blueprint function with e.g. String signature only if you know the data type will be a string. See [emit with callback section](https://github.com//socketio-client-ue4#emit-with-callback) for a list of supported signatures. Issue #65]([https://github.com//socketio-client-ue4/issues/65](https://github.com//socketio-client-ue4/issues/65)) fix merged in [591c150](https://github.com//socketio-client-ue4/commit/591c1507aab15a52e2d42900bc75f9dec78345ab)  
-FSocketIONative now exposed as API. Issue #66]([https://github.com//socketio-client-ue4/issues/66](https://github.com//socketio-client-ue4/issues/66)) merged in [7e32f70](https://github.com//socketio-client-ue4/commit/7e32f7009523b126fe457b67ea8f56054cce66f3) spotted by **GeneralD**

_0.6.0_  
-Rebased to accomodate #43]([https://github.com//socketio-client-ue4/issues/43](https://github.com//socketio-client-ue4/issues/43)). You can now put [FSocketIONative](https://github.com//socketio-client-ue4#c-fsocketionative) anywhere with your own allocation structure.  
-‘On’ event dispatch changed to ‘OnEvent’.  
-Candidate fixes for #41]([https://github.com//socketio-client-ue4/issues/41](https://github.com//socketio-client-ue4/issues/41)), #32]([https://github.com//socketio-client-ue4/issues/32](https://github.com//socketio-client-ue4/issues/32)), and #38]([https://github.com//socketio-client-ue4/issues/38](https://github.com//socketio-client-ue4/issues/38))  
-Fixes to underlying library stopping re connection attempts when you close a connection: /socket.io-client-cpp@3f0cd99

_0.5.2_  
-Fixed boolean always returning false #35

_0.5.1_  
-Fixed undefined as second emit parameter from server #36

_0.5.0_  
-Fixes for disconnecting while communicating with an unreachable server #32  
-Boost updated to 1.62  
-Socket.io-cpp updated to latest master merge  
-misc internal features for tracking and killing lambda threads

_0.4.8_  
-UTF8 Support  
-Connection fixes  
-Session ID fix  
-Compile fixes for IWYU changes in 4.15  
-Scaffolds for other platforms from contributors (non-functioning)

_0.4.0_  
-Added SIOJson for Blueprint Json construction and conversion, based on VaRest  
-Auto-conversion for nodes  
-Blueprint callbacks and events bound to functions references by function name  
-Conversion of JsonObjects to and from UStructs, including Blueprint UStructs with automatically trimmed long names into readable short names  
-Overloaded EmitNative for all expect UE native data types  
-Much simplified C++ usage based on FJsonValue and FJsonObject including nested binary support (hackery!)  
-and much more

_0.2.6-0.3.4_  
-Internal versions for 0.4.0

_0.2.5_  
-Change event names and signatures  
-Add wider support for raw message emitting and receiving

_0.2.2-0.2.4_  
-raw sio::message support and events

_0.2.1_  
-added proper binary send/receive support  
-added functioning onconnect/disconnect events, no longer require  
special events on your server  
-added on namespace connect/disconnect events  
-added on fail event

_0.2.0_  
-Update to 4.13  
-Added connect/disconnect signatures (these have to be implemented by  
the server if used)  
-Added C++ lambda binds do e.g.  
BindDataLambdaToEvent(&](const FString& EventName, const FString& EventData) { //your code }, Name, Namespace);  
to use it  
-Bind changed name to BindEvent  
-Added Namespace support  
-Connection runs on background thread (should not be blocking anymore)

_0.1.2_  
-Updated compiled dlls and version for 4.12 (no code changes)

_0.1.1_  
-First release

---

<div class="post-metadata">

**Author:** ![Zarkopafilis](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zarkopafilis](https://forums.unrealengine.com/u/Zarkopafilis)\
**Post date:** [May 14, 2016, 5:42am UTC](https://forums.unrealengine.com/t/plugin-socket-io-client/63803/2 "2016-05-14T05:42:42Z")

</div>

Presentation slides? \>:D

---

<div class="post-metadata">

**Author:** ![getnamo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/getnamo/32/1194624_2.png) [@getnamo](https://forums.unrealengine.com/u/getnamo)\
**Post date:** [May 14, 2016, 11:08am UTC](https://forums.unrealengine.com/t/plugin-socket-io-client/63803/3 "2016-05-14T11:08:02Z")

</div>

> [@Zarkopafilis;529907](#):
>
> Presentation slides? \>:D

Presentation didn’t have too much technical meat before the actual demo as I did the whole thing live but here are the slides:

> **[London - Plugins in Unreal Engine 4](https://docs.google.com/presentation/d/1QhaEAWNkXeEr7NMvB7ilYcTSNjtZ7GwmVaHPiIXxcyw/edit?usp=sharing)**
>
> Plugins in Unreal Engine 4 Adding features with ease

And the video shown for the example custom c++ function is found here:

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/d/a/edabd3334f9ded57c668d3309930d9297a7350c3.jpeg "Writing a custom C++ function for BP use in UE4") ](https://www.youtube.com/watch?v=4CgCJsThsWU)

---

<div class="post-metadata">

**Author:** ![Zarkopafilis](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zarkopafilis](https://forums.unrealengine.com/u/Zarkopafilis)\
**Post date:** [May 14, 2016, 11:48am UTC](https://forums.unrealengine.com/t/plugin-socket-io-client/63803/4 "2016-05-14T11:48:57Z")

</div>

What can I say? Bookmarked 😛

---

<div class="post-metadata">

**Author:** ![Dannington](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dannington](https://forums.unrealengine.com/u/Dannington)\
**Post date:** [May 14, 2016, 4:15pm UTC](https://forums.unrealengine.com/t/plugin-socket-io-client/63803/5 "2016-05-14T16:15:43Z")

</div>

Thanks , really enjoyed your daring live c++ coding demo - glad it wasn’t me. Going to take a proper look at this next week. I’m quite interested in linking libraries so if you’ve got any pointers about that I’d be very interested.

---

<div class="post-metadata">

**Author:** ![teak421](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/teak421/32/902996_2.png) [@teak421](https://forums.unrealengine.com/u/teak421)\
**Post date:** [May 14, 2016, 5:26pm UTC](https://forums.unrealengine.com/t/plugin-socket-io-client/63803/6 "2016-05-14T17:26:00Z")

</div>

> [@;529861](#):
>
> [Socket.io](http://socket.io/) is a performant real-time bi-directional communication library. There are two parts, the server written in node.js and the client typically javascript for the web. There are alternative client implementations and I’ve used the [C++ client library](https://github.com/socketio/socket.io-client-cpp) and ported it to UE4.
> 
> For the [London is Unreal](http://www.meetup.com/London-Unreal-Engine-Meetup/) meetup I made a presentation on the topic of plugins and chose to implement a useful plugin live during the presentation. A [socket.io](http://socket.io) client was chosen as the plugin, which was finished with a basic _Connect_, _Bind_, _Emit_ functions and an _On_ event all interfaced through an Actor Component.
> 
> For now this is a basic bind, but may be extended in the future with better documentation. Enjoy!
> 
> **Download**  
> [Latest](https://github.com//socketio-client-ue4)
> 
> **Resources**  
> [Github Repository](https://github.com//socketio-client-ue4)  
> [Example UMG Chat Project](https://github.com//socketio-client-ue4-example) (contains server and both web and ue4 client)
> 
> Example project is a functional UMG based chat window place in world showing real-time communication ability of UE4 -\> Web/Mobile

Looks like a plugin I need to add to my tutorial… That is really neat!

teak

---

<div class="post-metadata">

**Author:** ![getnamo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/getnamo/32/1194624_2.png) [@getnamo](https://forums.unrealengine.com/u/getnamo)\
**Post date:** [May 15, 2016, 12:05pm UTC](https://forums.unrealengine.com/t/plugin-socket-io-client/63803/7 "2016-05-15T12:05:22Z")

</div>

Added some basic BP instructions to both the github readme and for convenience, this thread. Going forward the github readme will have all the most up to date documentation.

---

<div class="post-metadata">

**Author:** ![ZoltanJr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ZoltanJr](https://forums.unrealengine.com/u/ZoltanJr)\
**Post date:** [May 16, 2016, 2:04am UTC](https://forums.unrealengine.com/t/plugin-socket-io-client/63803/8 "2016-05-16T02:04:54Z")

</div>

Great work!

Going to give this 1 a try for some User detail input for an event I have coming up, should save me some time compared to doing REST server!

---

<div class="post-metadata">

**Author:** ![sjespers](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sjespers](https://forums.unrealengine.com/u/sjespers)\
**Post date:** [June 14, 2016, 8:16pm UTC](https://forums.unrealengine.com/t/plugin-socket-io-client/63803/9 "2016-06-14T20:16:21Z")

</div>

Any plans for updating this for 4.12?  
I’m currently working on a project in 4.12 and could really use this.

Thanks!

---

<div class="post-metadata">

**Author:** ![getnamo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/getnamo/32/1194624_2.png) [@getnamo](https://forums.unrealengine.com/u/getnamo)\
**Post date:** [June 16, 2016, 7:38pm UTC](https://forums.unrealengine.com/t/plugin-socket-io-client/63803/10 "2016-06-16T19:38:25Z")

</div>

> [@sjespers;547874](#):
>
> Any plans for updating this for 4.12?  
> I’m currently working on a project in 4.12 and could really use this.
> 
> Thanks!

Always nice to see someone using this :)! Please do note that the current bind is functional albeit a bit simple since it was done in 30min during the presentation and could use some updates to make event binding a bit easier.

**Update to 0.1.2**  
-Updated compiled dlls and versioning for 4.12 (no code changes)

Grab the latest at the usual spot: [https://github.com//socketio-client-ue4/releases](https://github.com//socketio-client-ue4/releases)

---

<div class="post-metadata">

**Author:** ![DIVYA\_ADITYA](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DIVYA\_ADITYA](https://forums.unrealengine.com/u/DIVYA_ADITYA)\
**Post date:** [June 28, 2016, 6:20pm UTC](https://forums.unrealengine.com/t/plugin-socket-io-client/63803/11 "2016-06-28T18:20:27Z")

</div>

@ Thanks for this awesome socketio client, works well.

but I am not able to use it in executable, it is working when I play in the editor, but when try to Launch as HTML5, Launch Fails.  
When I turn off the plugin and then launch project as HTML5, it works.

Is there anything with the compilation? How to use it in executable? Please reply.

---

<div class="post-metadata">

**Author:** ![getnamo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/getnamo/32/1194624_2.png) [@getnamo](https://forums.unrealengine.com/u/getnamo)\
**Post date:** [June 29, 2016, 1:45am UTC](https://forums.unrealengine.com/t/plugin-socket-io-client/63803/12 "2016-06-29T01:45:22Z")

</div>

> [@DIVYA ADITYA;556054](#):
>
> @ Thanks for this awesome socketio client, works well.
> 
> but I am not able to use it in executable, it is working when I play in the editor, but when try to Launch as HTML5, Launch Fails.  
> When I turn off the plugin and then launch project as HTML5, it works.
> 
> Is there anything with the compilation? How to use it in executable? Please reply.

The [boost and socket.io](https://github.com//socketio-client-prebuild) static libraries that this plugin depends on have only been compiled for the Win32 and Win64 platforms. I’m unsure how plugin dependencies are handled for the ue4 html5 platform as it is not one I develop for and the [documentation](https://docs.unrealengine.com/latest/INT/Platforms/HTML5/GettingStarted/index.html) and questions on [building with plugins](https://answers.unrealengine.com/questions/240047/cant-build-html5-because-victory-plugin.html) are [scarce and without resolution](https://answers.unrealengine.com/search.html?q=html5+plugin).

Perhaps someone from epic would be able to chime in on what steps would be required to include static libs for the ue html5 platform?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2c8781421](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2c8781421](https://forums.unrealengine.com/u/anonymous_user_2c8781421)\
**Post date:** [July 10, 2016, 11:02pm UTC](https://forums.unrealengine.com/t/plugin-socket-io-client/63803/13 "2016-07-10T23:02:08Z")

</div>

First, awesome work! And they are really clean to use from Blueprints. I do have one quick question though. I have a node server that I have been using as the backend for Unity and am looking to test it out against UE4, which there wasn’t a client for [socket.io](http://socket.io) when I first looked, so this is awesome!

The issue I am running into is if I pass a JSON object instead of a string, I dont seem to get anything back from the plugin. Are there plans to support more advanced objects?

Thanks!

Edit: Adding screenshot, unless I call JSON.stringify on my objects this always goes to empty string

 ![json.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/2/e/22e3942697ab42c58452b9b0a3fb11ab807fd399.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2c8781421](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2c8781421](https://forums.unrealengine.com/u/anonymous_user_2c8781421)\
**Post date:** [July 11, 2016, 1:09am UTC](https://forums.unrealengine.com/t/plugin-socket-io-client/63803/14 "2016-07-11T01:09:23Z")

</div>

Ok, one last issue I found, I might go look at the source and see if the 3rd party library is exposing it and it just needs to be wrapped or if it isn’t there.

It looks like the client hears socket.emit but doesnt hear io.emit. Let me see if I can explain that better. On the javascript side there are events that are inside of your existing connection, and those are what I am considering socket.emit, then there are those that are server level that run in the game loop. They fire irregardless of your connection being present or not, though of course I suppress them when noone is connected 🙂

Anyhow, awesome start! If I get time I will poke around at it and do a PR if it is something easy to fix but my C++ is limited at best 🙂

Edit: Sorry, just re-read the first message and noticed you stated this was very basic. Sorry for being silly 🙂

---

<div class="post-metadata">

**Author:** ![getnamo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/getnamo/32/1194624_2.png) [@getnamo](https://forums.unrealengine.com/u/getnamo)\
**Post date:** [July 11, 2016, 2:25pm UTC](https://forums.unrealengine.com/t/plugin-socket-io-client/63803/15 "2016-07-11T14:25:40Z")

</div>

> [@bot2600;562351](#):
>
> First, awesome work! And they are really clean to use from Blueprints. I do have one quick question though. I have a node server that I have been using as the backend for Unity and am looking to test it out against UE4, which there wasn’t a client for [socket.io](http://socket.io) when I first looked, so this is awesome!
> 
> The issue I am running into is if I pass a JSON object instead of a string, I dont seem to get anything back from the plugin. Are there plans to support more advanced objects?
> 
> Thanks!
> 
> Edit: Adding screenshot, unless I call JSON.stringify on my objects this always goes to empty string
> 
> …

Excellent idea on adding JSON parsing. When I bound the function, due to time constraints and simplicity I do a data-\>get\_string() then convert to UE FString to get a message, seen here: [https://github.com//socketio-client-ue4/blob/master/Source/SocketIOClient/Private/SocketIOClientComponent.cpp#L41](https://github.com//socketio-client-ue4/blob/master/Source/SocketIOClient/Private/SocketIOClientComponent.cpp#L41)

The base library that I integrated uses [sio::message](https://github.com/socketio/socket.io-client-cpp/blob/master/src/sio_message.h) as wrapper for JSON objects. This needs to take the received message object and turn it into a JSON string so you can parse it using the blueprint utility you’re using. Off the top of my head I thought get\_string() would do that, but apparently it strictly checks for ‘string’ type variables. Looking in the [socket.io-client-cpp library source](https://github.com/socketio/socket.io-client-cpp/tree/master/src) would be the best place to spot how.

Edit: seems the library doesn’t natively support message\<-\>JSON conversion, but a workaround can be found here: [Feature Request : Expose sio::message mapping to/from std::string · Issue #87 · socketio/socket.io-client-cpp · GitHub](https://github.com/socketio/socket.io-client-cpp/issues/87). To add the workaround to the plugin would require adding that function to the component implementation and just call it if we get an empty string from our regular method.

> [@bot2600;562389](#):
>
> Ok, one last issue I found, I might go look at the source and see if the 3rd party library is exposing it and it just needs to be wrapped or if it isn’t there.
> 
> It looks like the client hears socket.emit but doesnt hear io.emit. Let me see if I can explain that better. On the javascript side there are events that are inside of your existing connection, and those are what I am considering socket.emit, then there are those that are server level that run in the game loop. They fire irregardless of your connection being present or not, though of course I suppress them when noone is connected 🙂
> 
> Anyhow, awesome start! If I get time I will poke around at it and do a PR if it is something easy to fix but my C++ is limited at best 🙂
> 
> Edit: Sorry, just re-read the first message and noticed you stated this was very basic. Sorry for being silly 🙂

Have you tried io.sockets.emit()? This should work IMO, but it may be down to listening to the broadcast correctly.

I’ve added the two issues here: [https://github.com//socketio-client-ue4/issues](https://github.com//socketio-client-ue4/issues) and this is the link to the underlying library: [GitHub - socketio/socket.io-client-cpp: C++11 implementation of Socket.IO client](https://github.com/socketio/socket.io-client-cpp) let me know what you discover!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2c8781421](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2c8781421](https://forums.unrealengine.com/u/anonymous_user_2c8781421)\
**Post date:** [July 11, 2016, 2:32pm UTC](https://forums.unrealengine.com/t/plugin-socket-io-client/63803/16 "2016-07-11T14:32:48Z")

</div>

Yes, I poked around a bit at the interface for the base library you used, didn’t even realize the source is out there, that will make things easier. I’ll have to take a look at what it takes to compile a plugin this weekend and see if I can get some more functionality going. Returning the object instead of a string would have actually been more convenient anyhow as I could do just about anything with it once I had that! I did see the base library has that and other magic that can come out.

For the io.sockets.emit(), I think its the same thing, io.emit emits to all active socket connections, but I will take a look and see. I am at work now so I don’t have the notes I took when I looked at the base library unfortunately.

Thanks for the response, sorry for stirring everything up on something that was basically just a prototype 🙂

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_41dc327b1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_41dc327b1](https://forums.unrealengine.com/u/anonymous_user_41dc327b1)\
**Post date:** [July 12, 2016, 10:30am UTC](https://forums.unrealengine.com/t/plugin-socket-io-client/63803/17 "2016-07-12T10:30:10Z")

</div>

Hello, first of all thank you very much for your plugin, it’s been very useful to me 🙂  
Similarly to DIVYA ADITYA, I needed to use this plugin for another platform (Android), and I was trying to recompile your source code for using it as an Android library (I was going to make you a pull request once I had it all builted and tested, if you might be interested 🙂 ). However, I am having several issues even to compile your code and its dependencies. VS2015 for UE4 does’t seem to like websocketpp and boost as dependencies. Did you have to do some particular trick, in order to compile your library with those dependencies?

---

<div class="post-metadata">

**Author:** ![getnamo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/getnamo/32/1194624_2.png) [@getnamo](https://forums.unrealengine.com/u/getnamo)\
**Post date:** [July 12, 2016, 12:30pm UTC](https://forums.unrealengine.com/t/plugin-socket-io-client/63803/18 "2016-07-12T12:30:47Z")

</div>

> [@ocramot;563160](#):
>
> Hello, first of all thank you very much for your plugin, it’s been very useful to me 🙂  
> Similarly to DIVYA ADITYA, I needed to use this plugin for another platform (Android), and I was trying to recompile your source code for using it as an Android library (I was going to make you a pull request once I had it all builted and tested, if you might be interested 🙂 ). However, I am having several issues even to compile your code and its dependencies. VS2015 for UE4 does’t seem to like websocketpp and boost as dependencies. Did you have to do some particular trick, in order to compile your library with those dependencies?

Yeah the original library source is at [GitHub - socketio/socket.io-client-cpp: C++11 implementation of Socket.IO client](https://github.com/socketio/socket.io-client-cpp). If I remember right I had to download boost 1.6 and compile it and then grab [Network Graph · zaphoyd/websocketpp · GitHub](https://github.com/zaphoyd/websocketpp/network) one of the forks in websocketpp that solved some of the compile issues there. Instead of just adding the prebuilt libraries in the repo, maybe I should find the old source for building those libraries for vs2015, I’ll dig around!

If you do get a successful android build, by all means make pull requests! This is a community plugin, not something exclusive.

---

<div class="post-metadata">

**Author:** ![getnamo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/getnamo/32/1194624_2.png) [@getnamo](https://forums.unrealengine.com/u/getnamo)\
**Post date:** [September 2, 2016, 1:20pm UTC](https://forums.unrealengine.com/t/plugin-socket-io-client/63803/21 "2016-09-02T13:20:27Z")

</div>

> [@DatapawWolf;587948](#):
>
> @ so I found out if the server is unavailable (crashed), the editor completely freezes up and I have to end it.

Interesting that sounds like the timeout happens on the game thread, the solution is to simply make the connection attempt off-thread. I’ve added it to issues: [https://github.com//socketio-client-ue4/issues/3](https://github.com//socketio-client-ue4/issues/3) and will try to address it next time I make a pass on the plugin. Feel free to make pull requests if you fix it before 🙂

---

<div class="post-metadata">

**Author:** ![Tyleet](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tyleet](https://forums.unrealengine.com/u/Tyleet)\
**Post date:** [September 22, 2016, 2:34pm UTC](https://forums.unrealengine.com/t/plugin-socket-io-client/63803/22 "2016-09-22T14:34:00Z")

</div>

Hi,  
thanks for the plugin. It seems I have some trouble getting it to work though. I use the version for UE4.11, socketIO is running on 0.9. I try to connect to socket io with connect node “[http://192.168.1.50:5000](http://192.168.1.50:5000)” then I want to emit a command. The colleague who set up the Server said SocketIO Namespace was “events” and the event I need to send to is called “unityFanSpeedEvent” and receives only a number between 0 and 100.

I guess the problem is the SocketIO namespace, I’m not sure in what node I need to add the namespace (connect or emit?). Sorry if this is some kind of a stupid question, it’s my first time working with socketIO.

Here is what I’m trying to do:  
 ![ue4SocketIO.PNG](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/9/0/89054b4c3fb0217431a7b6291b54f66112573f4c.png)

[Next page](https://forums.unrealengine.com/t/plugin-socket-io-client/63803.md?page=2)
