1234567891011121314151617181920212223242526272829303132333435 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ICommunication
- {
- public interface ICommunication:EventBus.IEventBroker
- {
- public string IP { get; }
- public int Port { get; }
- public bool IsLan { get; }
- public bool IsConnected { get; }
- public event EventHandler Connected;
- public event EventHandler Disconnected;
- public bool IsService { get; }
- public void Connect(string ip, int port);
- public void StartService(string ip,int port);
- public void Close();
- public void Start();
- }
- public sealed class CommunicationTypeAttribute:Attribute
- {
- public CommunicationTypeAttribute(bool isLan)
- {
- IsLan = isLan;
- }
- public bool IsLan { get; }
- }
- }
|