<commit_before>﻿// Copyright (c) 2007-2016 ppy Pty Ltd <<EMAIL>>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE

using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using osu.Framework.Input;
using osu.Framework.Input.Handlers;
using osu.Framework.Platform;

namespace osu.Framework.Desktop.Platform
{
    public abstract class DesktopGameHost : BasicGameHost
    {
        public override GLControl GLControl => Window?.Form;

        private TextInputSource textInputBox;
        public override TextInputSource TextInput => textInputBox ?? (textInputBox = ((DesktopGameWindow)Window).CreateTextInput());
        private TcpIpcProvider IpcProvider;
        private Task IpcTask;
        
        public override void Load()
        {
            IpcProvider = new TcpIpcProvider();
            IsPrimaryInstance = IpcProvider.Bind();
            if (IsPrimaryInstance)
            {
                IpcProvider.MessageReceived += msg => OnMessageReceived(msg);
                IpcTask = IpcProvider.Start();
            }
            base.Load();
        }
       
        
        protected override async Task SendMessage(IpcMessage message)
        {
            await IpcProvider.SendMessage(message);
        }
        
        protected override void Dispose(bool isDisposing)
        {
            IpcProvider.Dispose();
            IpcTask?.Wait(50);
            base.Dispose(isDisposing);
        }
    }
}<commit_msg>Update DesktopGameHost post-rebase<commit_after>﻿// Copyright (c) 2007-2016 ppy Pty Ltd <<EMAIL>>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE

using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using osu.Framework.Input;
using osu.Framework.Input.Handlers;
using osu.Framework.Platform;

namespace osu.Framework.Desktop.Platform
{
    public abstract class DesktopGameHost : BasicGameHost
    {
        public override GLControl GLControl => Window?.Form;

        private TextInputSource textInputBox;
        public override TextInputSource TextInput => textInputBox ?? (textInputBox = ((DesktopGameWindow)Window).CreateTextInput());
        private TcpIpcProvider IpcProvider;
        private Task IpcTask;
        
        public override void Load(BaseGame game)
        {
            IpcProvider = new TcpIpcProvider();
            IsPrimaryInstance = IpcProvider.Bind();
            if (IsPrimaryInstance)
            {
                IpcProvider.MessageReceived += msg => OnMessageReceived(msg);
                IpcTask = IpcProvider.Start();
            }
            base.Load(game);
        }
       
        
        protected override async Task SendMessage(IpcMessage message)
        {
            await IpcProvider.SendMessage(message);
        }
        
        protected override void Dispose(bool isDisposing)
        {
            IpcProvider.Dispose();
            IpcTask?.Wait(50);
            base.Dispose(isDisposing);
        }
    }
}
{'fraction_non_alphanumeric': 0.08926453143534994, 'fraction_numerical': 0.005931198102016607, 'mean_word_length': 2.4453524004085803, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '128668', 'n_tokens_mistral': 923, 'n_tokens_neox': 900, 'n_words': 205}