Beispiel #1
0
 private void Exit(object sender, EventArgs args)
 {
     Task.Run(async() =>
     {
         await socket.Exit();
     }).Wait();
 }
Beispiel #2
0
        public async Task Exit()
        {
            exit = true;
            await updateTask;

            if (!startGame)
            {
                await socket.Exit();
            }
            else
            {
                socket.ReceivedOk      -= OnReceiveOk;
                socket.AnotherJoinRoom -= OnAnotherJoinedRoom;
            }
        }