Search Unity

Third Party Getting Socket exception in unity webGL

Discussion in 'Multiplayer' started by anvar1234u, Sep 17, 2019.

  1. anvar1234u

    anvar1234u

    Joined:
    Feb 6, 2017
    Posts:
    2
    I'm developing a multiplayer game using AWS game lift. game lift is working fine for android and iOS but when i'm running the game in webgl, getting socket exception:


    SocketException: Success
    at System.Net.Sockets.Socket..ctor (System.Net.Sockets.AddressFamily addressFamily, System.Net.Sockets.SocketType socketType, System.Net.Sockets.ProtocolType protocolType) [0x00000] in <00000000000000000000000000000000>:0

    (Filename: currently not available on il2cpp Line: -1)


    can anyone help?
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Does Gamelift support WebGL? From a quick search of their documentation they say it uses UDP and TCP, but WebGL can only use Websockets. The only mention of Websockets in docs I saw was just for encrypted data. This isn't a Unity limitation, but a platform limitation (imposed by the browser).

    WebGL isn't on there list of supported platforms, and isn't anywhere in their documentation that a quick search could find, so I would assume they do not support WebGL. But that's just my guess.
     
  3. dustinkerstein

    dustinkerstein

    Joined:
    Jan 26, 2017
    Posts:
    16
    Hey! Just wanted to check in on this. Did you happen to past this socket error in WebGL?
     
  4. z0code0z

    z0code0z

    Joined:
    Apr 10, 2018
    Posts:
    38
    Currently experiencing this even though gamelift states they utilize dtls which should work over webgl
     
  5. dhathora

    dhathora

    Joined:
    Jun 1, 2023
    Posts:
    2
    Getting the same err on FishNet with Bayou transport (that's supposed to work with WS), if that helps
     
    swapnil-mishraj likes this.
  6. wanlwanl

    wanlwanl

    Joined:
    Jul 7, 2022
    Posts:
    7
    Check out Azure Web PubSub Transport, which is based on websocket. quick start video: