Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Release] Version 2.0.0 #26

Merged
merged 28 commits into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
029bad1
Lib refactoring (#18)
Bukk94 Apr 17, 2023
6cc076d
Async/Await refactoring (#19)
Bukk94 Apr 17, 2023
717c3f2
code improvement and bug fix in `WebSocketClient`
Apr 18, 2023
3e6a750
Merge pull request #20 from AoshiW/dev
Syzuna Apr 18, 2023
3e6d2ba
<Nullable>enable</Nullable>
Apr 19, 2023
05aa112
Merge pull request #21 from AoshiW/feature/nullable
Syzuna Apr 28, 2023
668cb06
improve logging performance
Apr 29, 2023
eb50932
change lLogger to ILogger<T>
May 1, 2023
db65596
Async Task Events
May 6, 2023
860f746
Removed delegate from class
May 6, 2023
8108207
Merge pull request #22 from AoshiW/better-logging
Syzuna May 25, 2023
b5bf10f
Merge pull request #23 from GimliCZ/dev
Syzuna Jun 8, 2023
0c4ab4e
Fixed double disconnection during reconnect, ignore all TaskCancelled…
Bukk94 Jun 10, 2023
535f17b
Removed unused using
Bukk94 Jun 10, 2023
5df348f
Merge pull request #24 from Bukk94/feature/FixedDoubleDisconnection
Syzuna Jun 15, 2023
e3206a6
Generate documentation file, updated copyright to year 2023
Bukk94 Jun 28, 2023
32bd3e8
Merge pull request #25 from Bukk94/feature/GenerateDocumentationFile
Syzuna Jun 28, 2023
80ae3aa
Add Multitargetting for standard 2.0/2.1 and .net 6/7
Syzuna Jul 3, 2023
911d2cc
bump used .NET version in GH action workflows
Syzuna Jul 3, 2023
b1032a8
Fix tests and bump workflow action versions
Syzuna Jul 3, 2023
d9bdf98
fix test worklflow again
Syzuna Jul 3, 2023
1f56ecb
switch to File Scope Namespace, and more
AoshiW Jul 3, 2023
f92fff7
remove .net6 from test, doc for Client Options
AoshiW Jul 5, 2023
6649cad
remove `<Features>strict</Features>`
AoshiW Aug 5, 2023
96ec32e
`catch when(...)` changes
AoshiW Aug 5, 2023
6e98a4d
Merge pull request #27 from AoshiW/modern-.NET
swiftyspiffy Aug 5, 2023
0b90943
OnSendFailedEventArgs: data -> message rename
swiftyspiffy Aug 5, 2023
7d9d00b
Merge pull request #28 from TwitchLib/fix_on_send_failed
swiftyspiffy Aug 5, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions .github/workflows/check-buildstatus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,19 @@ jobs:
check-buildstatus:

runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: [ '7.0.x' ]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
dotnet-version: ${{ matrix.dotnet-version }}
- name: Restore dependencies
run: dotnet restore
- name: Build TwitchLib.Communication
run: dotnet build --no-restore
run: dotnet build --no-restore --configuration Release
- name: Test
run: dotnet test --no-restore --verbosity normal
6 changes: 3 additions & 3 deletions .github/workflows/preview-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
dotnet-version: 7.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build TwitchLib.Communication
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
dotnet-version: 7.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build TwitchLib.Communication
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/tests-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Test TwitchLib.Communication Linux

on:
[push]

jobs:
tests:

runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: [ '7.0.x' ]

steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Restore dependencies
run: dotnet restore
- name: Build TwitchLib.Communication
run: dotnet build --no-restore --configuration Release
- name: Test
run: dotnet test --no-restore --verbosity normal
25 changes: 25 additions & 0 deletions .github/workflows/tests-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Test TwitchLib.Communication Windows

on:
[push]

jobs:
tests:

runs-on: windows-latest
strategy:
matrix:
dotnet-version: [ '7.0.x' ]

steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Restore dependencies
run: dotnet restore
- name: Build TwitchLib.Communication
run: dotnet build --no-restore --configuration Release
- name: Test
run: dotnet test --no-restore --verbosity normal
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -233,4 +233,7 @@ $RECYCLE.BIN/
*.msp

# Windows shortcuts
*.lnk
*.lnk

# Rider files
.idea/*
101 changes: 101 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# Changelog

## Version 2.0.0
### Addresses
##### Issues
- https://github.com/TwitchLib/TwitchLib/issues/1093
- https://github.com/TwitchLib/TwitchLib.Client/issues/206
- https://github.com/TwitchLib/TwitchLib/issues/1104
- https://github.com/TwitchLib/TwitchLib.Communication/issues/13
- https://github.com/TwitchLib/TwitchLib.Communication/issues/7

##### Pull Requests
- none

---

### Changes

---

#### IClient
##### Changed
- now extends `IDisposable`
- `event EventHandler<OnReconnectedEventArgs> OnReconnected;`
- to `event EventHandler<OnConnectedEventArgs> OnReconnected;`
- now the `event`handlers argument is `OnConnectedEventArgs` instead of `OnReconnectedEventArgs`
- the specific `event`handler itself, determines wether the args are in context of connect or reconnect
- `IClient.Send(string message)` is now synchronized because
- `ThrottlerService` got removed
- https://learn.microsoft.com/en-us/dotnet/api/system.net.sockets.networkstream?view=netstandard-2.0#remarks
##### Added
- none
##### Removed
- see also: https://discuss.dev.twitch.tv/t/deprecation-of-chat-commands-through-irc/40486
- `bool SendWhisper(string message);`
- `void WhisperThrottled(OnWhisperThrottledEventArgs eventArgs);`
- `event EventHandler<OnDataEventArgs> OnData;`
- as far as i got it right,
- binary data is not received
- it has never ever been used/raised
- `event EventHandler<OnMessageThrottledEventArgs> OnMessageThrottled;`
- because `ThrottlerService` is now part of `TwitchLib.Client`
- `event EventHandler<OnStateChangedEventArgs> OnStateChanged;`
- neither used by `TwitchLib.Client` nor by `TwitchLib.PubSub`
---

#### ClientOptions
##### Changed
- `value`s for properties can only be passed by `ctor`
- `ctor` also takes an argument for `ReconnectionPolicy`
- by leaving it `null`, a `default` `ReconnectionPolicy` is created, that attempts to reconnect every 3_000 milliseconds for ten times
- `DisconnectWait` became an unsigned integer (`uint`), to ensure only positive values are used for it
##### Removed
- see also: https://discuss.dev.twitch.tv/t/deprecation-of-chat-commands-through-irc/40486
- `TimeSpan WhisperThrottlingPeriod { get; set; }`
- `int WhispersAllowedInPeriod { get; set; }`
- `int WhisperQueueCapacity { get; set; }`
##### <span id="ClientOptions.Moved">Moved</span>
- the following properties went to `TwitchLib.Client.Models.SendOptions`
- `int SendQueueCapacity { get; set; }`
- `TimeSpan SendCacheItemTimeout { get; set; }`
- `ushort SendDelay { get; set; }`
- `TimeSpan ThrottlingPeriod { get; set; }`
- `int MessagesAllowedInPeriod { get; set; }`

---

#### ConnectionWatchDog
- now the `ConnectionWatchDog` enforces reconnect according to the `ReconnectionPolicy`
- `ConnectionWatchDog` does not send `PING :tmi.twitch.tv`-messages anymore
- `TwitchLib.Client` receives `PING :tmi.twitch.tv`-messages and has to reply with `PONG :tmi.twitch.tv`
- https://dev.twitch.tv/docs/irc/#keepalive-messages
- `TwitchLib.Client` does so
- it handles received PING-messages
- `TwitchLib.PubSub` has to send `PING :tmi.twitch.tv` within at least every five minutes
- https://dev.twitch.tv/docs/pubsub/#connection-management
- `TwitchLib.PubSub` does so
- it has its own PING- and PONG-Timer

---

#### Throttling/ThrottlerService
- `TwitchLib.Communication.IClient` doesnt throttle messages anymore
- `TwitchLib.PubSub` does not need it
- only `TwitchLib.Client` needs it
- so, throttling went to `TwitchLib.Client.Services.ThrottlerService` in combination with `TwitchLib.Client.Services.Throttler`
- everything related to throttling got removed
- `TwitchLib.Communication.Events.OnMessageThrottledEventArgs`
- `TwitchLib.Communication.Interfaces.IClientOptions`
- see also [ClientOptions.Moved](#ClientOptions.Moved)
- `int SendQueueCapacity { get; set; }`
- `TimeSpan SendCacheItemTimeout { get; set; }`
- `ushort SendDelay { get; set; }`
- `TimeSpan ThrottlingPeriod { get; set; }`
- `int MessagesAllowedInPeriod { get; set; }`

---

#### OnStateChangedEventArgs
- removed
- neither used by `TwitchLib.Client` nor by `TwitchLib.PubSub`
6 changes: 3 additions & 3 deletions TwitchLib.Communication.sln
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27703.2035
# Visual Studio Version 17
VisualStudioVersion = 17.5.33424.131
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TwitchLib.Communication", "src\TwitchLib.Communication\TwitchLib.Communication.csproj", "{5DBA3070-744D-45EF-84EA-D5ECF3C71CFE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TwitchLib.Communication.Tests", "src\TwitchLib.Communication.Tests\TwitchLib.Communication.Tests.csproj", "{8945B40A-7E9A-423E-964F-E215C112DA56}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TwitchLib.Communication.Tests", "src\TwitchLib.Communication.Tests\TwitchLib.Communication.Tests.csproj", "{8945B40A-7E9A-423E-964F-E215C112DA56}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
Loading