TCP Blueprint Plugin

Hello everyone,

I am happy to announce my [FONT=Arial Black]TCP Blueprint plugin:
https://www.unrealengine.com/marketp…ueprint-plugin

It allows you to connect to a server using tcp protocol and it’s designed so users
can use blueprints only so they dont need to write code with c++.

Source code is also provided so you can customized to your needs.

Features:

  • custom IP and port defined in blueprint nodes
  • Blueprint nodes to connect/disconnect
  • blueprint events onConnect/onDisconnect/onConnectionFail
  • receive and send: int32,float,string
  • Blueprint node to read all as string
  • 5 Python server scripts examples included
  • Example project using the 5 tcp servers simultaneously
  • ready for ue4.13

Video :ue4 tcp blueprint plugin - YouTube

Example project available for download (requires plugin to compile):
www.motion.mx/ue4/tcpexample/TCPexample.zip

UPDATE 03/01/2019

Added easy to use “bp_EasyStringTCP” to the blueprint, just drag to your viewport and use its method “SendStringToServer” to send strings and the “onTcpStringReceived” event to listen for incoming strings.

I am also sharing an server utility program to create tcp and websocket servers to allow you to quick test the plugin and communicate several clients with ue4 (the server utility is only for testing purposes and is not part of the plugin)
you can get the download link from the plugin blueprint bp_EasyStringTCP graph code.

New tutorial “simple chat with tcp” using the “server utility”

Hope you all like it :slight_smile:

I also created a new example to connect UE4 with Community Core Vision ( CCV 1.2 )
to show how to use the TCP blueprint plugin to get touch detections.

Download the project from (requires the plugin to compile):
http://motion.mx/ue4/tcpexample/ue4_ccv.zip

And this is the video:

CRASHING EDITOR ON WIN10 quick fix

CRASHING EDITOR ON WIN10 quick fix

Some users started to report an editor crash when using the plugin, i found that there is a problem
with the plugin binaries installed on the Engine directory.
I reported this to EPIC and im waiting for their feedback,
meanwhile these are the steps to fix the problem until i get a response from epic:

*****Be aware, if you follow these steps you will have to manually copy this plugin sources to your projects

STEPS TO INSTALL PLUGIN PER PROJECT AND COMPILE

  1. open the directory C:\Program Files (x86)\Epic Games\4.13\Engine\Plugins\Marketplace
    2c5d80f0af7523c95177c34c27739dfa4b640e68.jpeg

  2. in that directory there must exist the BluNet directory, create a zip of it (to keep a backup)
    3c595ee5033a5e9a0f751c210900dbf0449990c6.jpeg

  3. move the BluNet directory to your “yourproject/plugins/” directory (if dir plugins does not exist then manually create it)
    b3b0c9708111c2b4dc6ede8c5c8937ee169ecad8.jpeg

  4. delete everything inside “yourproject/plugins/BluNet/Binaries”
    77904c4aeb533eac5f8352adf3bf29152d52b7cd.jpeg

  5. open yourproject and let the editor compile the plugin binaries
    3cce3dda192245b6f56089be44c8f0a1070c9d03.jpeg

Please let me know any issues you may find posting in this thread or using the email support@motion.mx

Someone asked me to create a demo for using the tcp plugin with android, i just made a proof of concept project, if anyone wants the project just send me a pm.
This is the video :

EDIT - It’s ok I managed to get it working in my UE4 16 project anyway,
Main priority was to simulate the python scripts successfully, that i did by using Python 2.7 IDLE GUI.:smiley:

Hey Paranoio

I can’t seem to open your example projects in UE4-16 !
Opening the projects I am getting the ~

The following modules are missing or built with a different engine version
UE4Editor-TCPexample.dll
UE4Editor-BluNet.dll

go to recompile then ~

CCVExample could not be compiled try rebuilding from source manually

I have the plugin successfully in seen engine with any new project,
I have copied the plugins to the project plugins too (as above)!
I don’t have VS 2013 or 2017 on my machine do i need it to recompile this?

all best

Cliff

Great to hear you found your way around, i was not aware of your post sorry.

Can you give instructions on how to run on UE 4.18.3 just keeps giving me the same error as Clifford was getting in the above post.

Hello CMTech,

are you getting the “modules are missing or built with a different engine version” ?

i actually dont mantain the project CCV (only the plugin and the example project) , if you are getting that error is probably because i created CCV and have not updated to a new version of UE4,
to solve it :
-try changing the ue4 version of the project (second mouse click over the project file) and “switch unreal engine version” then choose the same ue4 version to match the one of the plugin (probably latest 4.18)
-alternatively you could try moving the plugin from ue4 directory to your project directory(so you can recompile the plugin) , just follow my instructions above about “CRASHING EDITOR ON WIN10 quick fix”

Hi paranoio, I have a question about the update function. (posting this here, maybe someone have the same question)

In your example (did the same in my project for now), you run the Update each tick. So if I’m correct, it mean that if I have 60 frame per seconds, it will try to update the socket 60 time in a second.

So if I receive more then 60 data per second, example if I have 20 player that send their position 10 time a seconds, that mean 200 string to read each second, so you’ll be update for only 33% of the new position and you’ll have to wait another second until the next 33% segment can be read, but a new 200 string will arrive at the same time. Correct me if I’m wrong, my test using the plugin lead me to think it work like this.

So my solution for now (didn’t test yet, but I’ll edit this when it’s test) is to keep my reading on tick + starting a «Set timer by Event» on begin play that update 20 time each 0.1 seconds like this:

https://forums.unrealengine.com/filedata/fetch?filedataid=136428&type=thumb

Not sure if it’s really appropriate. I want to ear you tell me what you think about this problem and solution. If you have other solution (test or not) tell me, I’m open to any suggestion!

have a good day!

Hello
Thats not the way it works, as you can see in the screenshot in the node connect you have a parameter “In Update Time”
wich defines the time to wait between updates.
In the code of c++ there is a buffer wich receives your data and when the update time is reached it sends the accumulated data.
If you want to see the code look in the FBluNetConnectionThread.cpp file.