Files
shadowsocks-windows/shadowsocks-csharp/Proxy/IProxy.cs
T
noisyfox 53ce1948e4 Unified ipv4, ipv6 and domain connections.
-Use dual-mode socket & DnsEndPoint to handle all domain name connection.
-Move all socket creation into one single function.

So that we could treat domain name just like ipv4 & ipv6 address.
This also solves the async domain solving problem because the os will
hanlde it for us.
2016-08-16 20:40:09 +10:00

39 lines
995 B
C#

using System;
using System.Net;
using System.Net.Sockets;
namespace Shadowsocks.Proxy
{
public interface IProxy
{
EndPoint LocalEndPoint { get; }
EndPoint ProxyEndPoint { get; }
EndPoint DestEndPoint { get; }
void BeginConnectProxy(EndPoint remoteEP, AsyncCallback callback, object state);
void EndConnectProxy(IAsyncResult asyncResult);
void BeginConnectDest(EndPoint destEndPoint, AsyncCallback callback, object state);
void EndConnectDest(IAsyncResult asyncResult);
void BeginSend(byte[] buffer, int offset, int size, SocketFlags socketFlags, AsyncCallback callback,
object state);
int EndSend(IAsyncResult asyncResult);
void BeginReceive(byte[] buffer, int offset, int size, SocketFlags socketFlags, AsyncCallback callback,
object state);
int EndReceive(IAsyncResult asyncResult);
void Shutdown(SocketShutdown how);
void Close();
}
}