~ruther/NosSmooth.Comms

ref: b06241f4c3251cb4b2ddfb0bf29d5936f5906637 NosSmooth.Comms/src/Core/NosSmooth.Comms.Abstractions/IConnection.cs -rw-r--r-- 853 bytes
b06241f4 — František Boháček feat: remove Character id and name from HandshakeResponse 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//
//  IConnection.cs
//
//  Copyright (c) František Boháček. All rights reserved.
//  Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System.Data;

namespace NosSmooth.Comms.Data;

/// <summary>
/// A connection, either a client or a server connection.
/// </summary>
public interface IConnection
{
    /// <summary>
    /// Gets the state of the connection.
    /// </summary>
    public ConnectionState State { get; }

    /// <summary>
    /// Gets the stream used for reading the data received.
    /// </summary>
    public Stream ReadStream { get; }

    /// <summary>
    /// Gets the stream used for writing data.
    /// </summary>
    public Stream WriteStream { get; }

    /// <summary>
    /// Disconnect, close the connection.
    /// </summary>
    public void Disconnect();
}
Do not follow this link