Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

WebSocket Client C++ HowTo


i am trying to let my GameClient open a WebSocket Connection. I found the libwebsockets package inside the Engine. But in the description of the Header file ther is written that its just a websocket server.

How else i can add websocket client functionality to my game ?



Product Version: UE 4.8
more ▼

asked Jul 29 '15 at 07:53 PM in C++ Programming

avatar image

16 1 2 2

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

4 answers: sort voted first

You can find a Websocket implementation for the libwebsocket library located in Engine/Source/ThirdParty/WebSockets.

Part of the private classes of that library are an implementation of a WebSocket in C++. You can copy that class to your project, rename it and use the websocket connection. This will limit your project to Windows and maybe HTML5.

At least I did something similar half a year ago with Unreal 4.8, but my projects are now outside of my reach. I hope this helps. Good luck!

more ▼

answered Nov 12 '15 at 02:49 PM

avatar image

70 9 10 18

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

I write a websocket plugin for unreal engine 4, you can use it with c++ or blueprint api.


more ▼

answered Aug 12 '17 at 08:24 AM

avatar image

301 2 6 21

(comments are locked)
10|2000 characters needed characters left
Viewable by all users


Unfortunatelly as far as I know the UE4 don't have any good implementation for a websocket client.

I've written the new engine module that deal with it using the libwebsockets built from libwebsockets git.

The libwebsockets itself is quite low level stuff, but this file https://github.com/davidgaleano/libwebsockets/blob/master/test-server/test-client.c can help You understand how to do it.

Unfortunatelly I can't help more. NDA, this stuf... :(

more ▼

answered Jul 30 '15 at 07:52 AM

avatar image

755 24 48 145

avatar image Lokidiabel Jul 30 '15 at 07:53 AM

Whats about this ? Looks promising for me:


avatar image zompi2 Jul 30 '15 at 09:03 AM

It looks ok for simple use. Just keep in mind there might be few issues:

  1. I can't see any threading in this plugin.

  2. There is only binary sending, so when sending FStrings you have to perform a conversion.

  3. There is no support for self-signed certificates if You want to keep Your connection safe.

  4. There is no support for deflating packages, so make sure to keep Your packages small.

But I think it's a good place to start, now I'm wondering why I didn't find it at the first place :)

avatar image Lokidiabel Aug 02 '15 at 06:40 PM

Ok i am now using easywsclient. But i am looking for another solution. This doesnt seems very stable (or more it lack features which i need)

Maybe i will try websocketpp

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

hello, any update on websocketpp? I use websocketpp Cinder block( https://github.com/wieden-kennedy/Cinder-WebSocketPP ), I would like to have an Unreal websocket client... thank you

more ▼

answered Nov 06 '15 at 10:21 AM

avatar image

1 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question