add websock topic (#83)
This commit is contained in:
parent
eabf183e6d
commit
fec0f2bac1
|
@ -16,6 +16,9 @@ import
|
||||||
../../types,
|
../../types,
|
||||||
../../frame
|
../../frame
|
||||||
|
|
||||||
|
logScope:
|
||||||
|
topics = "websock deflate"
|
||||||
|
|
||||||
type
|
type
|
||||||
DeflateOpts = object
|
DeflateOpts = object
|
||||||
isServer: bool
|
isServer: bool
|
||||||
|
|
|
@ -19,7 +19,7 @@ import pkg/[
|
||||||
import ./types
|
import ./types
|
||||||
|
|
||||||
logScope:
|
logScope:
|
||||||
topics = "ws-frame"
|
topics = "websock ws-frame"
|
||||||
|
|
||||||
#[
|
#[
|
||||||
+---------------------------------------------------------------+
|
+---------------------------------------------------------------+
|
||||||
|
|
|
@ -19,7 +19,7 @@ import pkg/[
|
||||||
import ./common
|
import ./common
|
||||||
|
|
||||||
logScope:
|
logScope:
|
||||||
topics = "http-client"
|
topics = "websock http-client"
|
||||||
|
|
||||||
type
|
type
|
||||||
HttpClient* = ref object of RootObj
|
HttpClient* = ref object of RootObj
|
||||||
|
|
|
@ -22,6 +22,9 @@ import pkg/[
|
||||||
|
|
||||||
export httputils, httptable, tlsstream, uri
|
export httputils, httptable, tlsstream, uri
|
||||||
|
|
||||||
|
logScope:
|
||||||
|
topics = "websock http-common"
|
||||||
|
|
||||||
const
|
const
|
||||||
MaxHttpHeadersSize* = 8192 # maximum size of HTTP headers in octets
|
MaxHttpHeadersSize* = 8192 # maximum size of HTTP headers in octets
|
||||||
MaxHttpRequestSize* = 128 * 1024 # maximum size of HTTP body in octets
|
MaxHttpRequestSize* = 128 * 1024 # maximum size of HTTP body in octets
|
||||||
|
|
|
@ -18,9 +18,11 @@ import pkg/[
|
||||||
when isLogFormatUsed(json):
|
when isLogFormatUsed(json):
|
||||||
import json_serialization/std/net
|
import json_serialization/std/net
|
||||||
|
|
||||||
|
|
||||||
import ./common
|
import ./common
|
||||||
|
|
||||||
|
logScope:
|
||||||
|
topics = "websock http-server"
|
||||||
|
|
||||||
type
|
type
|
||||||
HttpAsyncCallback* = proc (request: HttpRequest):
|
HttpAsyncCallback* = proc (request: HttpRequest):
|
||||||
Future[void] {.closure, gcsafe, raises: [Defect].}
|
Future[void] {.closure, gcsafe, raises: [Defect].}
|
||||||
|
|
|
@ -16,7 +16,7 @@ import ./types, ./frame, ./utils, ./utf8dfa, ./http
|
||||||
import pkg/chronos/streams/asyncstream
|
import pkg/chronos/streams/asyncstream
|
||||||
|
|
||||||
logScope:
|
logScope:
|
||||||
topics = "ws-session"
|
topics = "websock ws-session"
|
||||||
|
|
||||||
proc prepareCloseBody(code: StatusCodes, reason: string): seq[byte] =
|
proc prepareCloseBody(code: StatusCodes, reason: string): seq[byte] =
|
||||||
result = reason.toBytes
|
result = reason.toBytes
|
||||||
|
|
|
@ -32,7 +32,7 @@ import ./utils, ./frame, ./session, /types, ./http, ./extensions/extutils
|
||||||
export utils, session, frame, types, http
|
export utils, session, frame, types, http
|
||||||
|
|
||||||
logScope:
|
logScope:
|
||||||
topics = "ws-server"
|
topics = "websock ws-server"
|
||||||
|
|
||||||
type
|
type
|
||||||
WSServer* = ref object of WebSocket
|
WSServer* = ref object of WebSocket
|
||||||
|
|
Loading…
Reference in New Issue