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

UTP: Separate Request types into classes #637

Merged
merged 8 commits into from
Oct 4, 2024
Merged

Conversation

ScottyPoi
Copy link
Collaborator

@ScottyPoi ScottyPoi commented Oct 3, 2024

  1. UtpSocket
  • Refactors UtpSocket class into abstract class with shared logic
  • Creates new classes ReadSocket and WriteSocket
  • Separates methods and attributes of different types of sockets
  • new constructor function createUtpSocket
  1. ContentRequest
  • Refactors ContentRequest class into abstract class
  • Creates new class for each request type
    • FindContentReadRequest
    • FoundContentWriteRequest
    • OfferWriteRequest
    • AcceptReadRequest
  • Separates logic / packet handlers for each request type
    • Eliminates conditionals within utp methods
  1. PortalNetworkUtp
  • Moves most request methods into ContentRequest classes
  • PortalNetworkUtp class refactored to just manage open requests

@acolytec3 acolytec3 merged commit bf4fe33 into master Oct 4, 2024
4 checks passed
@acolytec3 acolytec3 deleted the utp-request-refactor branch October 4, 2024 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants