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;
        }
    }
}
