add websock topic (#83)

This commit is contained in:
Tanguy Cizain 2021-07-14 19:26:46 +02:00 committed by GitHub
parent eabf183e6d
commit fec0f2bac1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 13 additions and 5 deletions

View File

@ -16,6 +16,9 @@ import
../../types,
../../frame
logScope:
topics = "websock deflate"
type
DeflateOpts = object
isServer: bool

View File

@ -19,7 +19,7 @@ import pkg/[
import ./types
logScope:
topics = "ws-frame"
topics = "websock ws-frame"
#[
+---------------------------------------------------------------+

View File

@ -19,7 +19,7 @@ import pkg/[
import ./common
logScope:
topics = "http-client"
topics = "websock http-client"
type
HttpClient* = ref object of RootObj

View File

@ -22,6 +22,9 @@ import pkg/[
export httputils, httptable, tlsstream, uri
logScope:
topics = "websock http-common"
const
MaxHttpHeadersSize* = 8192 # maximum size of HTTP headers in octets
MaxHttpRequestSize* = 128 * 1024 # maximum size of HTTP body in octets

View File

@ -18,9 +18,11 @@ import pkg/[
when isLogFormatUsed(json):
import json_serialization/std/net
import ./common
logScope:
topics = "websock http-server"
type
HttpAsyncCallback* = proc (request: HttpRequest):
Future[void] {.closure, gcsafe, raises: [Defect].}

View File

@ -16,7 +16,7 @@ import ./types, ./frame, ./utils, ./utf8dfa, ./http
import pkg/chronos/streams/asyncstream
logScope:
topics = "ws-session"
topics = "websock ws-session"
proc prepareCloseBody(code: StatusCodes, reason: string): seq[byte] =
result = reason.toBytes

View File

@ -32,7 +32,7 @@ import ./utils, ./frame, ./session, /types, ./http, ./extensions/extutils
export utils, session, frame, types, http
logScope:
topics = "ws-server"
topics = "websock ws-server"
type
WSServer* = ref object of WebSocket