Index
Modules:
guildenstern/dispatcher
,
guildenstern/guildenserver
,
guildenstern/httpserver
,
guildenstern/multipartserver
,
guildenstern/websocketserver
.
API symbols
`$`:
guildenserver: proc `$`(x: SocketHandle): string
AlreadyClosed:
guildenserver: SocketCloseCause.AlreadyClosed
BodyChunk:
multipartserver: PartState.BodyChunk
BodyReady:
multipartserver: PartState.BodyReady
checkSocketState:
httpserver: proc checkSocketState(ret: int): SocketState
CloseCalled:
guildenserver: SocketCloseCause.CloseCalled
ClosedbyClient:
guildenserver: SocketCloseCause.ClosedbyClient
closeOtherSocket:
guildenserver: proc closeOtherSocket(server: GuildenServer; socket: posix.SocketHandle; cause: SocketCloseCause = CloseCalled; msg: string = "")
CloseOtherSocketCallback:
guildenserver: type CloseOtherSocketCallback
closeSocket:
guildenserver: proc closeSocket(cause = CloseCalled; msg = "")
CloseSocketCallback:
guildenserver: type CloseSocketCallback
Compact:
httpserver: ContentType.Compact
Complete:
httpserver: SocketState.Complete
Completed:
multipartserver: PartState.Completed
ConnectionLost:
guildenserver: SocketCloseCause.ConnectionLost
ContentType:
httpserver: enum ContentType
DEBUG:
guildenserver: LogLevel.DEBUG
DontClose:
guildenserver: SocketCloseCause.DontClose
ERROR:
guildenserver: LogLevel.ERROR
Excepted:
guildenserver: SocketCloseCause.Excepted
Fail:
httpserver: SocketState.Fail
Failed:
multipartserver: PartState.Failed
FATAL:
guildenserver: LogLevel.FATAL
getBody:
httpserver: proc getBody(): string
getBodylen:
httpserver: proc getBodylen(): int
getContentLength:
httpserver: proc getContentLength(): bool
getMessage:
websocketserver: proc getMessage(): string
getMethod:
httpserver: proc getMethod(): string
getRequest:
httpserver: proc getRequest(): string
getUri:
httpserver: proc getUri(): string
GuildenServer:
guildenserver: type GuildenServer
GuildenSternVersion:
guildenserver: const GuildenSternVersion
handleHttpThreadInitialization:
httpserver: proc handleHttpThreadInitialization(gserver: GuildenServer)
HandlerCallback:
guildenserver: type HandlerCallback
handleRead:
guildenserver: template handleRead(socketdata: ptr SocketData)
HeaderReady:
multipartserver: PartState.HeaderReady
http:
httpserver: template http(): untyped
HttpContext:
httpserver: type HttpContext
HttpServer:
httpserver: type HttpServer
INFO:
guildenserver: LogLevel.INFO
initHttpServer:
httpserver: proc initHttpServer(s: HttpServer; loglevel: LogLevel; parserequestline: bool; contenttype: ContentType; headerfields: openArray[string])
initialize:
guildenserver: proc initialize(server: GuildenServer; loglevel: LogLevel)
initializeThread:
guildenserver: template initializeThread(server: ptr GuildenServer)
isBody:
httpserver: proc isBody(body: string): bool
isHeaderreceived:
httpserver: proc isHeaderreceived(previouslen, currentlen: int): bool
isHttpContext:
httpserver: proc isHttpContext(): bool
isMessage:
websocketserver: proc isMessage(message: string): bool
isMethod:
httpserver: proc isMethod(amethod: string): bool
isUri:
httpserver: proc isUri(uri: string): bool
log:
guildenserver: template log(theserver: GuildenServer; level: LogLevel; message: string)
LogCallback:
guildenserver: type LogCallback
LogLevel:
guildenserver: enum LogLevel
longdivider:
httpserver: let longdivider
MSG_DONTWAIT:
httpserver: const MSG_DONTWAIT
MSG_MORE:
httpserver: const MSG_MORE
NetErrored:
guildenserver: SocketCloseCause.NetErrored
newHttpServer:
httpserver: proc newHttpServer(onrequestcallback: proc () {.gcsafe, nimcall, raises: [].}; loglevel = LogLevel.WARN; parserequestline = true; contenttype = Compact; headerfields: openArray[string] = []): HttpServer
newMultipartServer:
multipartserver: proc newMultipartServer(onrequestcallback: proc () {.gcsafe, nimcall, raises: [].}; loglevel = LogLevel.WARN; headerfields: openArray[string] = []): HttpServer
newWebsocketServer:
websocketserver: proc newWebsocketServer(upgradecallback: WsUpgradeCallback; afterupgradecallback: WsAfterUpgradeCallback; onwsmessagecallback: WsMessageCallback; onclosesocketcallback: OnCloseSocketCallback; loglevel = LogLevel.WARN): WebsocketServer
NoBody:
httpserver: ContentType.NoBody
NONE:
guildenserver: LogLevel.NONE
NOTICE:
guildenserver: LogLevel.NOTICE
OnCloseSocketCallback:
guildenserver: type OnCloseSocketCallback
parseContentDisposition:
multipartserver: proc parseContentDisposition(): (string, string)
parseMethod:
httpserver: proc parseMethod(): bool
parseRequestLine:
httpserver: proc parseRequestLine(): bool
PartState:
multipartserver: enum PartState
prepareHttpContext:
httpserver: proc prepareHttpContext(socketdata: ptr SocketData)
Progress:
httpserver: SocketState.Progress
ProtocolViolated:
guildenserver: SocketCloseCause.ProtocolViolated
readHeader:
httpserver: proc readHeader(): bool
receiveParts:
multipartserver: iterator receiveParts(parsepartheaders: bool = true): (PartState, string)
receiveStream:
httpserver: iterator receiveStream(): (SocketState, string)
reply:
httpserver: proc reply(code: HttpCode): SocketState
httpserver: proc reply(code: HttpCode; body: ptr string; headers: openArray[string])
httpserver: proc reply(code: HttpCode; body: ptr string; headers: ptr string)
httpserver: proc reply(code: HttpCode; body: ptr string; lengthstring: string; length: int; headers: ptr string; moretocome: bool): SocketState
httpserver: template reply(code: HttpCode; headers: openArray[string])
httpserver: template reply(code: HttpCode; body: string)
httpserver: template reply(code: HttpCode; body: string; headers: openArray[string])
httpserver: template reply(body: string)
httpserver: template reply(body: string; headers: openArray[string])
replyContinueChunked:
httpserver: proc replyContinueChunked(chunk: string): bool
replyFinish:
httpserver: proc replyFinish(): SocketState
replyFinishChunked:
httpserver: proc replyFinishChunked(): bool
replyMore:
httpserver: proc replyMore(bodypart: ptr string; start: int; partlength: int = -1): (SocketState, int)
httpserver: template replyMore(bodypart: string): bool
replyStart:
httpserver: proc replyStart(code: HttpCode; contentlength: int; headers: openArray[string]): SocketState
httpserver: proc replyStart(code: HttpCode; contentlength: int; headers: ptr string = nil): SocketState
replyStartChunked:
httpserver: proc replyStartChunked(code: HttpCode = Http200; headers: openArray[string] = []): bool
SecurityThreatened:
guildenserver: SocketCloseCause.SecurityThreatened
send:
websocketserver: proc send(server: GuildenServer; socket: posix.SocketHandle; message: string; timeoutsecs = 2; sleepmillisecs = 10): bool
websocketserver: proc send(server: GuildenServer; delivery: ptr WsDelivery; timeoutsecs = 10; sleepmillisecs = 10): int
websocketserver: proc send(server: GuildenServer; sockets: seq[posix.SocketHandle]; message: string; timeoutsecs = 10; sleepmillisecs = 10): bool
server:
httpserver: template server(): untyped
shortdivider:
httpserver: let shortdivider
shutdown:
guildenserver: proc shutdown()
shutdownevent:
guildenserver: var shutdownevent
shuttingdown:
guildenserver: var shuttingdown
SocketCloseCause:
guildenserver: enum SocketCloseCause
SocketContext:
guildenserver: type SocketContext
socketcontext:
guildenserver: var socketcontext
SocketData:
guildenserver: object SocketData
SocketState:
httpserver: enum SocketState
start:
dispatcher: proc start(server: GuildenServer; port: int; threadpoolsize: uint = 0; maxactivethreadcount: uint = 0)
startsUri:
httpserver: proc startsUri(uristart: string): bool
Streaming:
httpserver: ContentType.Streaming
suspend:
guildenserver: proc suspend(sleepmillisecs: int)
SuspendCallback:
guildenserver: type SuspendCallback
ThreadInitializerCallback:
guildenserver: type ThreadInitializerCallback
TimedOut:
guildenserver: SocketCloseCause.TimedOut
TRACE:
guildenserver: LogLevel.TRACE
TryAgain:
httpserver: SocketState.TryAgain
WARN:
guildenserver: LogLevel.WARN
WebsocketServer:
websocketserver: type WebsocketServer
ws:
websocketserver: template ws(): untyped
WsAfterUpgradeCallback:
websocketserver: type WsAfterUpgradeCallback
WsDelivery:
websocketserver: tuple WsDelivery
WsMessageCallback:
websocketserver: type WsMessageCallback
wsserver:
websocketserver: template wsserver(): untyped
WsUpgradeCallback:
websocketserver: type WsUpgradeCallback