mirror of
https://github.com/dorssel/usbipd-win.git
synced 2026-11-10 14:43:56 +08:00
27 lines
672 B
C#
27 lines
672 B
C#
// SPDX-FileCopyrightText: 2020 Frans van Dorsselaer
|
|
//
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
using System.Net;
|
|
using System.Net.Sockets;
|
|
using Usbipd.Automation;
|
|
|
|
namespace Usbipd;
|
|
|
|
sealed partial class ClientContext : IDisposable
|
|
{
|
|
public TcpClient TcpClient { get; set; } = new();
|
|
/// <summary>
|
|
/// Canonical remote client IP address (either IPv4 or IPv6).
|
|
/// </summary>
|
|
public IPAddress ClientAddress { get; set; } = IPAddress.Any;
|
|
public BusId? AttachedBusId { get; set; }
|
|
public DeviceFile? AttachedDevice { get; set; }
|
|
|
|
void IDisposable.Dispose()
|
|
{
|
|
TcpClient.Dispose();
|
|
AttachedDevice?.Dispose();
|
|
}
|
|
}
|