0 votes

Bottom line question is: Is it possible at all to run websocket based godot server from standard webservers like IIS, Apache, ...? How exactly.

The referenced project "websocket_chat" is part of "Godot 3.1 Demo Projects" under category "networking". When exported in HTML5 (GLES3) and deployed to IIS it seems the WebSocketServer part is having difficulties establishing listening port (8000): Error listening on port 8000.

If exported to Windows executable the chat Server works (is listening). Interesting is that we can disable support for WebSocket on IIS and chat Clients in web browser have no problem connecting to standalone server (Windows build) that uses websockets.

in Engine by (34 points)

2 Answers

0 votes
Best answer

Let me answer this properly: It is not possible to run websocket based godot server from standard webservers like IIS, Apache. Godot has no possibilities to integrate with IIS or any other webserver for that matter. HTML5 is client-side technology that runs in web browser even though it is deployed on web servers like IIS, Apache.

It is possible to integrate websocket application server with IIS using ASP.NET Core:
https://docs.microsoft.com/en-us/aspnet/core/introduction-to-aspnet-core

by (34 points)
–1 vote

Hi,
Is it possible at all to run websocket based godot server from standard webservers like IIS, Apache
IIS seems to integrate this ... comes up as first google search result
https://docs.microsoft.com/en-us/iis/get-started/whats-new-in-iis-8/iis-80-websocket-protocol-support

Apache usualy not

When exported in HTML5 (GLES3) and deployed to IIS it seems the WebSocketServer part is having difficulties establishing listening port (8000): Error listening on port 8000.

You need a websocket server running on the port or else you cant connect. The browser cant establish a socket, it only can connect to one.

If exported to Windows executable the chat Server works (is listening). Interesting is that we can disable support for WebSocket on IIS and chat Clients in web browser have no problem connecting to standalone server (Windows build) that uses websockets.

The IIS doesnt hinder the browser from connecting to the executables socket.

I think your understanding of WebSockets workings isnt to good. Maybe you want to google for some tutorials that clearifies the subject.

by (3,878 points)

You need a websocket server running on the port or else you cant connect. The browser cant establish a socket, it only can connect to one.

This answer needs more details / arguments. The question is about how to start listening port hosted on IIS from web application (made with Godot) - from browser to put it in plain words. If it is not possible then everyone should know why this is not possible. This should be documented in Websocket section of Godot Documentation.

The question was "Can HTML5 Godot Demo "Websocket_chat" be deployed on IIS or Apache and run as chat server?!

Wich it cant because web applications cant start a server. It only can connect to a server. The Server has to be implemented on server side.

I think i would be better to first point to the missunderstanding of who is a server who is a client. Wich i see is a bit mixed up.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.