Search Unity

Making a lobby manager

Discussion in 'Connected Games' started by xred13, Sep 16, 2018.

  1. xred13

    xred13

    Joined:
    Jul 14, 2018
    Posts:
    74
    Hello, so i am making a 1v1's game, and my idea for making the lobbies to manage the connection between both players is the following:
    a thread per lobby, with a new socket with an open udp port
    the client would connect to the server and after that he would be redirected to an already existing socket in a thread or create a new thread with a new socket.

    would this work? would it be too annoying for the server, any better ideas? :p

    Thanks.
     
  2. xred13

    xred13

    Joined:
    Jul 14, 2018
    Posts:
    74
    Or maybe having a list / dictionary of threads and have the client give a message about which thread it is and do it with multiple clients through only one socket?