Created
January 12, 2018 08:25
-
-
Save NoamB/cca0ba364c4932a4515f8b6b9e6dfd24 to your computer and use it in GitHub Desktop.
Httpkit code reading
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Http-kit code reading | |
HttpException - standard exception | |
DynamicBytes - self expanding byte array | |
HeaderMap - array used as map for speed | |
HttpMethod - enum for methods | |
HttpStatus - class for http statuses | |
HttpVersion - http versions enum | |
HttpUtils - encoding and shit, also the logging mechanism of this lib | |
LineReader - for reading lines from byte buffer | |
LineTooLargeException - standard exception | |
PrefixThreadFactory - ThreadFactory with prefix and atomic id per thread | |
PriorityQueue - priority queue | |
ProtocolException - standard exception | |
RequestTooLargeException - standard exception | |
———— TIMER ------------ | |
timer/CancelableFutureTask - IFn you can run or cancel with timeout | |
timer/TimerService - puts CancelableFutureTasks into a priorityQueue and runs them. | |
————————————————— | |
——————— SERVER ----------------------- | |
server/Frame - WS frames - only normal close is handled | |
server/AsyncChannel - uses UnSafe, handles HTTP streaming (chunking), same interface for HTTP and WS | |
server/ServerAtta - abstract base class, holds a list of buffers to write | |
server/HttpAtta - holds decoder | |
server/HttpDecoder - decodes http request and returns HttpRequest | |
server/HttpRequest - request class | |
server/WsAtta - holds WsDecoder and channel | |
server/WsDecoder - decodes WS and returns a Frame | |
server/IHandler - an interface for handlers that has handle & close | |
server/RingHandler - takes requests, passes them to handler, then returns response - what does timeoutTs mean? | |
server/RespCallback - handles the 2nd half of the request, maybe in another thread. Holds channel key and server. | |
server/HttpServer - accepts incoming connections, selects keys in a loop, and handles them. | |
——————————————— | |
Clojure | |
——————————————— | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment