forked from NethermindEth/nethermind
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathISocketHandler.cs
More file actions
21 lines (19 loc) · 744 Bytes
/
Copy pathISocketHandler.cs
File metadata and controls
21 lines (19 loc) · 744 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// SPDX-FileCopyrightText: 2022 Demerzel Solutions Limited
// SPDX-License-Identifier: LGPL-3.0-only
using System;
using System.IO;
using System.Threading.Tasks;
namespace Nethermind.Sockets
{
/// <summary>
/// Interface that provides lower level operations (in comparison to <see cref="ISocketsClient"/>)
/// from a specific socket implementation like for example WebSockets, UnixDomainSockets or network sockets.
/// </summary>
public interface ISocketHandler : IDisposable
{
Task SendRawAsync(ArraySegment<byte> data, bool endMessage = true);
Task<ReceiveResult?> GetReceiveResult(ArraySegment<byte> buffer);
Task CloseAsync(ReceiveResult? result);
Stream SendUsingStream();
}
}