Have a tough question, I think.
I am currently setting up an HTML targeted multiplayer game and I am having some trouble with it actually using the HTML Socket Driver.
Steps that I have taken:
- Project is a blueprint project converted into a c++ project.
- HTML5 experimental plugin is enabled for the project
- Have changed the baseengine.ini to use the WebsocketNetDriver, and have commented out the other 2 lines of NetDriver (Have tried to keep the DemoNetDriver previously)
- Added the Settings for WebSocketNetDriver in the baseengine.ini
- ^Those two steps are in the readme file for the plugin
- I have added the Server.Target.cs file to my project, but I ran into the issue where BuildingRocket() doesn’t exist anymore (Have copy pasta’d from the ‘how to make a dedicated server’ wiki page; Also have built a windows server with the default drivers with no issue after removing the if/else lines)
- I have rebuilt the Engine/Project from Source
Now for the actual problem: When using a dedicated server in PIE, It connects using 127.0.0.1 with a map attached. None of the WebSocketNetDriver log lines print in my output log; The IPNetDriver prints these out when using that driver…such as using port #. I can build a game for html5 and windows using the WebDriver, but they will only connect to a dedicated server using a loopback. IP+Port will never work.
I feel as if I am missing one step for this to actually work ;_;
TLDR:
My issue has to do with not being able to connect to my IP address from an HTML game to a Windows dedicated server. It works in the console of the HTML game with local IP, but not an internet IP.
My ports are open and my firewall has the ports open (the game works on a normal dedicated server setup with a normal windows client when not using the experimental HTML5 plugin)
Some code when attempting to IP connect using PIE:
LogNet: Browse: (IP Address here):53501//Game/MyContent/Maps/FFA_Castle
LogNet: World NetDriver shutdown WebSocketNetDriver_2 [GameNetDriver]
LogNet: DestroyNamedNetDriver WebSocketNetDriver_2 [GameNetDriver]
LogNet: UNetConnection::Close: Name: WebSocketConnection_1, Driver: GameNetDriver WebSocketNetDriver_2, PC: FishController_C_3, Owner: FishController_C_3, Channels: 1011, RemoteAddr: Aviendha-PC, Time: 2015.06.13-05.37.26
LogNet: UChannel::Close: Sending CloseBunch. ChIndex == 0. Name: ControlChannel_1
LogNet: GetLocalNetworkVersion: GEngineNetVersion: 0, ProjectName: myproject2, ProjectVersion: 1.0.0.0, InternalProtocolVersion: 8, LocalNetworkVersion: 2634024906