Search Unity

Third Party Mirror Project Deployment - WebSockets and Port 80

Discussion in 'Multiplayer' started by chris-tdc, Jan 11, 2021.

  1. chris-tdc

    chris-tdc

    Joined:
    Dec 11, 2020
    Posts:
    19
    Hello

    Unity 2020.1

    I have built a primitive game to test the use of Mirror for a multi-player game using Simple Web Transport (WebSockets). I have configured the Simple Web Transport object to use port 80 as our webserver allows traffic through this port.

    I have built a Windows headless version to run on the server and act as the game server, relaying websocket traffic and I have built a WebGL version which I am hosting on the same server in IIS for players to access via their web browser.

    When I launch the .exe game server application I get the following error in the command window: "SocketException: An attempt was made to access a socket in a way forbidden by its access permissions." I checked in Server Manager that the Web Sockets feature is installed. When I subsequently ran the game in the Unity Editor on a client computer it appeared to spawn a new game object but logged the following error: Response key incorrect, Response:d Expected:long string of characters.

    Is it possible to use port 80 for my websocket traffic on the same server which has IIS hosting the website please? Any suggestions or advise very welcome.
     
  2. DamBru21

    DamBru21

    Joined:
    Jan 11, 2021
    Posts:
    1
    The WebSocket protocol provides a way of creating web applications that support real‑time bidirectional communication between clients and servers. Part of HTML5, WebsiteSocket makes it much easier to develop these types of applications than the methods previously available. Most modern browsers support WebSocket including Chrome, Firefox, Internet Explorer, Opera, and Safari, and more and more server application frameworks are now supporting WebSocket as well.I think it will you for my little help.