CodeSpartan/UE4TcpSocketPlugin

Failing to connect to server

johnsmakar opened this issue · 4 comments

Hello, I am fairly new to web socket, I just had a quick question on what I may be doing incorrect. I have a Microcontroller creating a DNS server and plug in the corresponding params into the connect blueprint but am not able to establish a connection to the the server.
image

Any help would be great. Thanks!

I can't comment on whether your setup outside of UE4 is correct, but the code on the picture is wrong - it will always display "failed to connect".

"Connect" is a non-blocking operation that happens in a separate thread. You're checking "Is Connected" the very same millisecond, before it had the chance to connect.
That's what the "Connected" and "Disconnected" events are for. If you connected successfully, the "Connected" event will fire. If it fails to connect, the "Disconnected" event will fire. Hook up your "print strings" to those events.

Also, this plugin is not for websockets. It's for TCP.

Thanks for the reply. I made the mentioned adjustments, but still no connection is made to the server. I am able to see the server when debugging with WireShark and connect to it with through my phone.

Maybe I need to make adjustments to my Windows Firewall or something?

Also, this plugin is not for websockets. It's for TCP.

Sorry, I misspoke. WebSocket uses TCP, so I accidently referred to it as web socket. I am just doing TCP.

UPDATE: I got it working now. My issue was that I was configured as a Access Point rather than a Station.

Thanks for all the help and making an easy to use plugin. Cheers.