IUdpClientProvider.cs 684 B

12345678910111213141516171819
  1. using System;
  2. namespace IFramework.Net.Udp
  3. {
  4. public interface IUdpClientProvider:IDisposable
  5. {
  6. OnReceivedHandler ReceivedCallbackHandler { get; set; }
  7. OnReceivedSegmentHandler ReceivedOffsetHandler { get; set; }
  8. int SendBufferPoolNumber { get; }
  9. OnSentHandler SentCallbackHandler { get; set; }
  10. bool Connect(int port, string ip);
  11. void Disconnect();
  12. void ReceiveSync(SegmentOffset receiveSegment, Action<SegmentOffset> receiveAction);
  13. bool Send(SegmentOffset sendSegment, bool waiting = true);
  14. int SendSync(SegmentOffset sendSegment, SegmentOffset receiveSegment);
  15. void StartReceive();
  16. }
  17. }