summaryrefslogtreecommitdiff
path: root/modules/mono/editor/GodotTools/GodotTools.IdeConnection/GodotIdeConnectionClient.cs
blob: 1b11a143582162921961c48938619c9ad7419156 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using System;
using System.Net.Sockets;
using System.Threading.Tasks;

namespace GodotTools.IdeConnection
{
    public class GodotIdeConnectionClient : GodotIdeConnection
    {
        public GodotIdeConnectionClient(TcpClient tcpClient, Func<Message, bool> messageHandler)
            : base(tcpClient, messageHandler)
        {
        }

        protected override bool WriteHandshake()
        {
            return WriteLine(ClientHandshake);
        }

        protected override bool IsValidResponseHandshake(string handshakeLine)
        {
            return handshakeLine == ServerHandshake;
        }
    }
}