You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

IProxy.cs 995 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. using System;
  2. using System.Net;
  3. using System.Net.Sockets;
  4. namespace Shadowsocks.Proxy
  5. {
  6. public interface IProxy
  7. {
  8. EndPoint LocalEndPoint { get; }
  9. EndPoint ProxyEndPoint { get; }
  10. EndPoint DestEndPoint { get; }
  11. void BeginConnectProxy(EndPoint remoteEP, AsyncCallback callback, object state);
  12. void EndConnectProxy(IAsyncResult asyncResult);
  13. void BeginConnectDest(EndPoint destEndPoint, AsyncCallback callback, object state);
  14. void EndConnectDest(IAsyncResult asyncResult);
  15. void BeginSend(byte[] buffer, int offset, int size, SocketFlags socketFlags, AsyncCallback callback,
  16. object state);
  17. int EndSend(IAsyncResult asyncResult);
  18. void BeginReceive(byte[] buffer, int offset, int size, SocketFlags socketFlags, AsyncCallback callback,
  19. object state);
  20. int EndReceive(IAsyncResult asyncResult);
  21. void Shutdown(SocketShutdown how);
  22. void Close();
  23. }
  24. }