|
Class: HTTPConnection
Object
|
+--HTTPConnection
|
+--FCGIConnection
|
+--HTTPSConnection
- Package:
- stx:goodies/webServer
- Category:
- Net-Communication-HTTP-Server
- Version:
- rev:
1.63
date: 2024/03/26 13:06:26
- user: cg
- file: HTTPConnection.st directory: goodies/webServer
- module: stx stc-classLibrary: webServer
I represent a still active http connection and will serve requests from this
until closed.
copyrightCOPYRIGHT (c) 2003 by eXept Software AG
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
accessing
-
defaultConnectionProcessStackSize
-
-
defaultConnectionProcessStackSize: something
-
HTTPConnection defaultConnectionProcessStackSize:2*1024*1024
defaults
-
idleTimeoutToCloseConnection
-
the number of idle seconds, after which a kept connection is closed
-
maxRequestHeaderSize
-
return the maximum size of a requests header
-
maxUploadSizeWithoutWriteToFile
-
above that, uploads are written to a file
-
maxUploadSizeWithoutWriteToFile: anInteger
-
above that, uploads are written to a file
Usage example(s):
self maxUploadSizeWithoutWriteToFile:100*1024
self maxUploadSizeWithoutWriteToFile:500*1024*1024
|
-
requestTimeOut
-
return the maximum time in secs until a request times out
-
requestTransmitTimeOut
-
return the maximum time in secs until a request must be transmitted
accessing
-
httpServer
-
-
httpServer: something
-
-
isWebSocketConnection
-
-
keepConnection: aBoolean
-
can be set to false during request handling to tell the requestor
to not expect me to keep the socket open.
By default, the httpServer decides and usually keeps a few connections
open
-
lastRequestTime
-
-
lastRequestTime: something
-
-
serveProcess
-
-
socket
-
-
socket: aSocket
-
-
startReadRequestTime
-
-
verbose
-
return the verbose messages flag from the server
-
verboseData
-
return the verbose-data flag from the server
-
verboseErrors
-
return the verbose errors flag from the server
closing
-
close
-
force an immediate close and terminate the process
-
closeSocket
-
close down the connection
-
scheduleForClose
-
remember to close the connection after processing
converting
-
becomeWebSocketConnection
-
logging
-
debugError: msg
-
debug-report some error condition to the Transcript
-
debugInfo: msg
-
debug-report some trace information to the Log
-
flushLog
-
flush our buffered log
-
logAccess: request
-
MessageTally spyDetailedOn:[
-
logError: aString
-
Add to the log.
-
logReply: aString
-
Add to the log.
-
logStream
-
-
logStream: aStream
-
set the log stream
-
logString: aString
-
Add to the log.
-
logWarning: aString
-
Add to the log.
printing
-
printOn: aStream
-
aStream nextPutAll:' n='.
Usage example(s):
requestCount printOn:aStream.
|
queries
-
overallNumberOfRequests
-
the number of served requests in this connection
-
requestTimeToPerform
-
what a stupid name
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
timeInRequest
-
the time we have spent in the current request
Or the last one, if finished.
In milliseconds or nil
-
timeToPerformRequest
-
the time it took to perform the previous request.
In milliseconds or nil
serving-processing
-
getContentLengthFrom: requestString
-
-
process
-
serve the connection (as a new process)
-
readQueryDataForPostMessageFrom: header
-
returns either the data or a stream on it (for huge post data as with an upload)
-
readUpToEndOrSize: nMax into: aStream
-
returns nil on error; nonNil if OK
-
readUpToEndOrSize: nMax into: buffer startingAt: startIndex
-
returns nil on error; nonNil if OK
-
serve
-
main loop on a connection:
- read request
- generate reply
when leaving the loop, the connection will be closed by our sender
-
setKeepConnectionForRequest: aRequest
-
handle keepConnection as specified in aRequest.
Notice: this is invoked BEFORE the request is actually handled - if a service
detects a bad guy or intruder, it may still choose to invoke keepConnection:false
-
waitForAndFetchRequest
-
Read the request and return an HTTPRequest instance,
or nil on any error.
startup & release
-
initializeFor: anHTTPServer socket: aSocket
-
initialize a connection served by aHTTPServer on aSocket
-
initializeFor: anHTTPServer socket: aSocket tlsCertificateStore: tlsCertificateStore
-
initialize a connection served by aHTTPServer on aSocket.
Serve a TLS connection if tlsCertificateStore is non-nil.
test support
-
quickSendTestResponse
-
used only for tests
testing
-
isKeepAlive
-
-
isOpen
-
-
shouldTimeout
-
answer true, if the currently pending request should timeout
|