1212
1313namespace RSocket . Transports
1414{
15+ //TODO Readd transport logging - worth it during debugging.
1516 public class SocketTransport : IRSocketTransport
1617 {
1718 private IPEndPoint Endpoint ;
1819 private Socket Socket ;
1920
2021 internal Task Running { get ; private set ; } = Task . CompletedTask ;
21- private CancellationTokenSource Cancellation ;
22- private volatile bool Aborted ;
22+ // private CancellationTokenSource Cancellation;
23+ private volatile bool Aborted ; //TODO Implement cooperative cancellation
2324
2425 public Uri Url { get ; private set ; }
2526 private LoggerFactory Logger ;
@@ -36,9 +37,8 @@ public SocketTransport(Uri url, PipeOptions outputoptions = default, PipeOptions
3637 if ( url . Port == - 1 ) { throw new ArgumentException ( "TCP Port must be specified." , nameof ( Url ) ) ; }
3738
3839 //Options = options ?? WebSocketsTransport.DefaultWebSocketOptions;
39- // Logger = new Microsoft.Extensions.Logging.LoggerFactory(new[] { new Microsoft.Extensions.Logging.Debug.DebugLoggerProvider() });
40+ Logger = new Microsoft . Extensions . Logging . LoggerFactory ( new [ ] { new Microsoft . Extensions . Logging . Debug . DebugLoggerProvider ( ) } ) ;
4041 ( Front , Back ) = DuplexPipe . CreatePair ( outputoptions , inputoptions ) ;
41- //Transport = new SocketsTransport(Options, Back, WebSocketsTransport.HttpConnectionContext.Default, Logger);
4242 }
4343
4444 public async Task ConnectAsync ( CancellationToken cancel = default )
@@ -125,7 +125,7 @@ private async Task ProcessSocketAsync(Socket socket)
125125
126126 private async Task StartReceiving ( Socket socket )
127127 {
128- var token = Cancellation ? . Token ?? default ;
128+ var token = default ( CancellationToken ) ; // Cancellation?.Token ?? default;
129129
130130 try
131131 {
0 commit comments