sta / websocket-sharp

A C# implementation of the WebSocket protocol client and server
http://sta.github.io/websocket-sharp
MIT License
5.74k stars 1.66k forks source link

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

Open CreazyBryon opened 2 years ago

CreazyBryon commented 2 years ago

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 );