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.

TcpPipeClient.cs 450 B

12345678910111213141516
  1. using Pipelines.Sockets.Unofficial;
  2. using System.IO.Pipelines;
  3. using System.Net;
  4. using System.Threading.Tasks;
  5. namespace Shadowsocks.Protocol
  6. {
  7. public class TcpPipeClient : IStreamClient
  8. {
  9. public async Task Connect(EndPoint destination, IDuplexPipe client, IDuplexPipe server)
  10. {
  11. var sc = await SocketConnection.ConnectAsync(destination);
  12. await DuplexPipe.CopyDuplexPipe(client, sc);
  13. }
  14. }
  15. }