Documentation ¶
Index ¶
- Variables
- func OperateThread(threadID ThreadID, op func(thread *Thread))
- func RecvFromKoala(threadID ThreadID) []byte
- func RemoveGlobalSock(socketFD SocketFD) *socket
- func SendToKoala(threadID ThreadID, span []byte, flags SendToFlags)
- type FileFD
- type RecvFlags
- type SendFlags
- type SendToFlags
- type SocketFD
- type Thread
- func (thread *Thread) ExportState() map[string]interface{}
- func (thread *Thread) IgnoreSocketFD(socketFD SocketFD, remoteAddr net.TCPAddr)
- func (thread *Thread) OnAccept(serverSocketFD SocketFD, clientSocketFD SocketFD, addr net.TCPAddr)
- func (thread *Thread) OnAcceptUnix(serverSocketFD SocketFD, clientSocketFD SocketFD, addr net.UnixAddr)
- func (thread *Thread) OnAccess()
- func (thread *Thread) OnBind(socketFD SocketFD, addr net.TCPAddr)
- func (thread *Thread) OnBindUnix(socketFD SocketFD, addr net.UnixAddr)
- func (thread *Thread) OnConnect(socketFD SocketFD, remoteAddr net.TCPAddr)
- func (thread *Thread) OnConnectUnix(socketFD SocketFD, remoteAddr net.UnixAddr)
- func (thread *Thread) OnOpenedFile(fileFD FileFD, fileName string, flags int)
- func (thread *Thread) OnOpeningFile(fileName string, flags int) string
- func (thread *Thread) OnRecv(socketFD SocketFD, span []byte, flags RecvFlags) []byte
- func (thread *Thread) OnSend(socketFD SocketFD, span []byte, flags SendFlags, extraHeaderSentSize int)
- func (thread *Thread) OnSendTo(socketFD SocketFD, span []byte, flags SendToFlags, addr net.UDPAddr)
- func (thread *Thread) OnShutdown()
- func (thread *Thread) OnWrite(fileFD FileFD, content []byte)
- type ThreadID
Constants ¶
This section is empty.
Variables ¶
View Source
var InboundRequestPrefix = []byte{}
InboundRequestPrefix is used to recognize php-fpm FCGI_BEGIN_REQUEST packet. fastcgi_finish_request() will send STDOUT first, then recv STDIN (if POST body has not been read before) this behavior will trigger session shutdown as we are going to think the recv STDIN is the beginning of next request. Set InboundRequestPrefix to []byte{1, 1} to only begin new session for FCGI_BEGIN_REQUEST. First 0x01 is the version field of fastcgi protocol, second 0x01 is FCGI_BEGIN_REQUEST.
View Source
var SetTimeOffset = func(offset int) {
}
Functions ¶
func OperateThread ¶
func RecvFromKoala ¶
func RemoveGlobalSock ¶
func RemoveGlobalSock(socketFD SocketFD) *socket
func SendToKoala ¶
func SendToKoala(threadID ThreadID, span []byte, flags SendToFlags)
Types ¶
type SendToFlags ¶
type SendToFlags int
type Thread ¶
func (*Thread) ExportState ¶
func (*Thread) IgnoreSocketFD ¶
func (*Thread) OnAcceptUnix ¶
func (*Thread) OnConnectUnix ¶
func (*Thread) OnOpenedFile ¶
func (*Thread) OnOpeningFile ¶
func (*Thread) OnShutdown ¶
func (thread *Thread) OnShutdown()
Click to show internal directories.
Click to hide internal directories.