sta / websocket-sharp

A C# implementation of the WebSocket protocol client and server

Home Page:http://sta.github.io/websocket-sharp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

CreazyBryon opened this issue · comments

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