Closed summatix closed 3 years ago
to be honest, I dont really get the value of these methods..
@Nucs what do you think? Personally, if we're thinking to have both, I mean async and sync, we should think of replacing the sync implementation by the calling the async impl using the SynchronouslyAwaitTaskResult extension method.
to be honest, I dont really get the value of these methods..
SocketClient(IPAddress host, int port, int bufferSize = 8192)
, DerivativeClient<double> CreateNew(IPAddress host, int port)
, DerivativeClient<double> CreateNew(IPAddress host, int port, int bufferSize)
, DerivativeClient<T> CreateNew<T>(IPAddress host, int port, int bufferSize, IDerivativeMessageHandler<T> derivativeMessageHandler)
— because I want to connect directly to an IP instead of a domain. The current code throws an exception if the given host isn't resolvable via a DNS query. I'd also be open to changing the existing methods to handle either an IP or a domain rather than adding methods specifically for IPs, but this was quicker for me to get working.
ConnectAsync
, DisconnectAsync
, SendAsync
, ReqBarWatchAsync
, UnwatchAllAsync
— because I want to call from async code without blocking.
ReqBarUnwatch(string symbol)
, ReqBarUnwatchAsync(string symbol)
, ReqBarUnwatchAsync(string symbol, string requestId)
— because I want to be able to unwatch an individual symbol rather than unwatch everything.
Personally, if we're thinking to have both, I mean async and sync, we should think of replacing the sync implementation by the calling the async impl using the SynchronouslyAwaitTaskResult extension method.
I think this is a good idea.
@mathpaquette Other than the last review, seems good.
I accidentally merged other branches I'm working on which is why the last CI build failed. The force pushes are from the rebases I did unmerging the branches. CI is passing again.
Added a few extra async methods. I've been using these in my fork to prevent blocking async code.