Skip to content

Commit

Permalink
Merge pull request #26 from TwitchLib/dev
Browse files Browse the repository at this point in the history
[Release] Version 2.0.0
  • Loading branch information
swiftyspiffy authored Sep 8, 2023
2 parents a55aa32 + 7d9d00b commit 9f1c618
Show file tree
Hide file tree
Showing 44 changed files with 2,471 additions and 1,550 deletions.
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

0 comments on commit 9f1c618

Please sign in to comment.