Skip to content
This repository was archived by the owner on Nov 13, 2025. It is now read-only.

feat: remove SendTimeout/ReceiveTimeout options#34

Merged
ArgoZhang merged 16 commits into
masterfrom
chore
Sep 24, 2025
Merged

feat: remove SendTimeout/ReceiveTimeout options#34
ArgoZhang merged 16 commits into
masterfrom
chore

Conversation

@ArgoZhang

Copy link
Copy Markdown
Member

Link issues

fixes #33

Summary By Copilot

Regression?

  • Yes
  • No

Risk

  • High
  • Medium
  • Low

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • Merge the latest code from the main branch

Copilot AI review requested due to automatic review settings September 23, 2025 10:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes SendTimeout and ReceiveTimeout options from the TcpSocket library, implementing a more efficient async socket handling approach using IValueTaskSource pattern instead of TaskCompletionSource.

  • Refactored Sender and Receiver classes to inherit from SocketAsyncEventArgs and implement IValueTaskSource pattern
  • Removed timeout-related code from send/receive operations
  • Updated package references from Microsoft.Extensions.Options.ConfigurationExtensions to Microsoft.Extensions.Options
  • Modified buffer handling in extension methods to use ArrayPool instead of MemoryPool

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
TcpSocketFactoryTest.cs Added new test for OnCompleted method, removed timeout-related tests, updated existing test expectations
Longbow.TcpSocket.csproj Updated version and simplified package references
Sender.cs Complete rewrite to use IValueTaskSource pattern with chunked sending logic
Receiver.cs Complete rewrite to use IValueTaskSource pattern, simplified error handling
DefaultTcpSocketClient.cs Removed timeout logic from send/receive operations
ITcpSocketClientExtensions.cs Changed from MemoryPool to ArrayPool for buffer management

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread test/UnitTestTcpSocket/TcpSocketFactoryTest.cs Outdated
Comment thread src/Longbow.TcpSocket/Internal/Sender.cs
Comment thread src/Longbow.TcpSocket/Interface/DefaultTcpSocketClient.cs
Comment thread src/Longbow.TcpSocket/Extensions/ITcpSocketClientExtensions.cs Outdated
@ArgoZhang ArgoZhang merged commit 9d6a70e into master Sep 24, 2025
1 check passed
@ArgoZhang ArgoZhang deleted the chore branch September 24, 2025 01:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: remove SendTimeout/ReceiveTimeout options

2 participants