/socketio-client-ue4

socket.io client plugin for UE4

Primary LanguageC++MIT LicenseMIT

socketio-client-ue4

socket.io client plugin for UE4

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 this repo uses the C++11 client library ported to UE4.

Uses Socket.io prebuild libraries for VS2015

Unreal Forum Thread

Recommended socket.io server: 1.2+ for regular (e.g. JSON or string transport), 1.4+ if you're using Binary data transport.

Quick Install & Setup

  1. Download Latest Release
  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

IMG

Specify your address and port, defaults to localhost (127.0.0.1) at port 3000

IMG

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 'On' event to your event graph

IMG

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

IMG

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

IMG

License

MIT