sta / sta/websocket-sharp

It's really hard for me to read those code.

Open
#711 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
6.1k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

are those popular styles recently?

var evt = method == "GET"
? OnGet
: method == "HEAD"
? OnHead
: method == "POST"
? OnPost
: method == "PUT"
? OnPut
: method == "DELETE"
? OnDelete
: method == "CONNECT"
? OnConnect
: method == "OPTIONS"
? OnOptions
: method == "TRACE"
? OnTrace
: null;

readHeaderAsync (
stream,
frame =>
readExtendedPayloadLengthAsync (
stream,
frame,
frame1 =>
readMaskingKeyAsync (
stream,
frame1,
frame2 =>
readPayloadDataAsync (
stream,
frame2,
frame3 => {
if (unmask)
frame3.Unmask ();
completed (frame3);
},
error
),
error
),
error
),
error
);

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Search the repository for the nested method-selection expression and the readHeaderAsync callback chain shown in the issue. Read the surrounding WebSocket protocol code and existing style guidance first; done should mean the highlighted code uses a clearer, agreed style without changing its behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
networking
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.