LLDB mainline
ProtocolServer.h
Go to the documentation of this file.
1//===-- ProtocolServer.h --------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLDB_CORE_PROTOCOLSERVER_H
10#define LLDB_CORE_PROTOCOLSERVER_H
11
13#include "lldb/Host/Socket.h"
15
16namespace lldb_private {
17
19public:
20 ProtocolServer() = default;
21 virtual ~ProtocolServer() = default;
22
23 static ProtocolServer *GetOrCreate(llvm::StringRef name);
24
25 static llvm::Error Terminate();
26
27 static std::vector<llvm::StringRef> GetSupportedProtocols();
28
29 struct Connection {
31 std::string name;
32 };
33
34 virtual llvm::Error Start(Connection connection) = 0;
35 virtual llvm::Error Stop() = 0;
36
37 virtual Socket *GetSocket() const = 0;
38};
39
40} // namespace lldb_private
41
42#endif
virtual Socket * GetSocket() const =0
static std::vector< llvm::StringRef > GetSupportedProtocols()
static llvm::Error Terminate()
virtual llvm::Error Stop()=0
virtual llvm::Error Start(Connection connection)=0
virtual ~ProtocolServer()=default
static ProtocolServer * GetOrCreate(llvm::StringRef name)
A class that represents a running process on the host machine.