-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8c4f5b4
commit b575cf6
Showing
2 changed files
with
31 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Draco.JsonRpc; | ||
|
||
/// <summary> | ||
/// Represents a JSON RPC connection. | ||
/// </summary> | ||
public interface IJsonRpcConnection | ||
{ | ||
/// <summary> | ||
/// Registers an RPC method handler. | ||
/// </summary> | ||
/// <param name="handler">The handler to register.</param> | ||
public void AddHandler(IJsonRpcMethodHandler handler); | ||
|
||
/// <summary> | ||
/// Starts the connection to listen for messages. | ||
/// </summary> | ||
/// <returns>The task that completes when the listening stops.</returns> | ||
public Task ListenAsync(); | ||
|
||
/// <summary> | ||
/// Stops the connection. | ||
/// </summary> | ||
public void Shutdown(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters