Plane.Sdk3/PlaneGcsSdk_Shared/CommunicationManagement/CommConnection.cs
zxd 4ffa68c99a 上传通信模块
修改了多网卡同时使用时的连接判断
2018-09-05 11:24:03 +08:00

43 lines
940 B
C#

using Plane.Communication;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
namespace Plane.CommunicationManagement
{
public class CommConnection : IConnection
{
public bool IsOpen { get; protected set; }
public event EventHandler<ExceptionThrownEventArgs> ExceptionThrown;
public int BytesToRead()
{
return 0;
}
public void Close()
{
IsOpen = false;
}
public Task OpenAsync()
{
IsOpen = true;
return TaskUtils.CompletedTask;
}
public async Task<int> ReadAsync(byte[] buffer, int offset, int count)
{
await TaskUtils.CompletedTask;
return 0;
}
public async Task WriteAsync(byte[] buffer, int offset, int count)
{
await TaskUtils.CompletedTask;
}
}
}