refact
This commit is contained in:
parent
1aafb7cc7d
commit
e24208e77b
32 changed files with 96 additions and 94 deletions
|
|
@ -80,7 +80,7 @@ namespace cli {
|
|||
_logger.LogInformation("Connecting to " + url);
|
||||
await _client.ConnectAsync(new Uri(url), _tokenSource.Token);
|
||||
_logger.LogInformation("Connected");
|
||||
const int bufLen = Yavsc.Constants.WebSocketsMaxBufLen;
|
||||
const int bufLen = Yavsc.YavscConstants.WebSocketsMaxBufLen;
|
||||
byte [] buffer = new byte[bufLen];
|
||||
const int offset=0;
|
||||
int read;
|
||||
|
|
@ -90,7 +90,7 @@ namespace cli {
|
|||
do
|
||||
{
|
||||
read = await stream.ReadAsync(buffer, offset, bufLen);
|
||||
lastFrame = read < Yavsc.Constants.WebSocketsMaxBufLen;
|
||||
lastFrame = read < Yavsc.YavscConstants.WebSocketsMaxBufLen;
|
||||
ArraySegment<byte> segment = new ArraySegment<byte>(buffer, offset, read);
|
||||
await _client.SendAsync(segment, pckType, lastFrame, _tokenSource.Token);
|
||||
_logger.LogInformation($"sent {segment.Count} ");
|
||||
|
|
|
|||
|
|
@ -40,8 +40,8 @@ namespace cli
|
|||
[NotMapped]
|
||||
[JsonIgnore]
|
||||
public string StreamingUrl { get {
|
||||
return Port==0 ? $"ws://{Authority}"+Constants.StreamingPath:
|
||||
$"ws://{Authority}:{Port}"+Constants.StreamingPath;
|
||||
return Port==0 ? $"ws://{Authority}"+YavscConstants.StreamingPath:
|
||||
$"ws://{Authority}:{Port}"+YavscConstants.StreamingPath;
|
||||
} }
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue