mirror of
https://github.com/JKorf/CryptoExchange.Net
synced 2025-06-07 16:06:15 +00:00
Exposed url of websocket
This commit is contained in:
parent
4102d4474e
commit
5380f7dd1d
@ -7,7 +7,7 @@
|
||||
<PropertyGroup>
|
||||
<PackageId>CryptoExchange.Net</PackageId>
|
||||
<Authors>JKorf</Authors>
|
||||
<PackageVersion>1.0.0</PackageVersion>
|
||||
<PackageVersion>1.0.1</PackageVersion>
|
||||
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
|
||||
<PackageProjectUrl>https://github.com/JKorf/CryptoExchange.Net</PackageProjectUrl>
|
||||
<PackageLicenseUrl>https://github.com/JKorf/CryptoExchange.Net/blob/master/LICENSE</PackageLicenseUrl>
|
||||
|
@ -24,6 +24,7 @@ namespace CryptoExchange.Net.Implementation
|
||||
protected readonly List<Action> closehandlers = new List<Action>();
|
||||
protected readonly List<Action<string>> messagehandlers = new List<Action<string>>();
|
||||
|
||||
public string Url { get; }
|
||||
public bool IsClosed => socket.State == WebSocketState.Closed;
|
||||
public bool IsOpen => socket.State == WebSocketState.Open;
|
||||
|
||||
@ -56,6 +57,7 @@ namespace CryptoExchange.Net.Implementation
|
||||
public BaseSocket(Log log, string url, IDictionary<string, string> cookies, IDictionary<string, string> headers)
|
||||
{
|
||||
this.log = log;
|
||||
Url = url;
|
||||
socket = new WebSocket(url, cookies: cookies.ToList(), customHeaderItems: headers.ToList())
|
||||
{
|
||||
EnableAutoSendPing = true,
|
||||
|
@ -14,6 +14,7 @@ namespace CryptoExchange.Net.Interfaces
|
||||
event Action<Exception> OnError;
|
||||
event Action OnOpen;
|
||||
|
||||
string Url { get; }
|
||||
WebSocketState SocketState { get; }
|
||||
bool IsClosed { get; }
|
||||
bool IsOpen { get; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user