sut

package
v2.4.4+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2018 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

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 OperateThread(threadID ThreadID, op func(thread *Thread))

func RecvFromKoala

func RecvFromKoala(threadID ThreadID) []byte

func RemoveGlobalSock

func RemoveGlobalSock(socketFD SocketFD) *socket

func SendToKoala

func SendToKoala(threadID ThreadID, span []byte, flags SendToFlags)

Types

type FileFD

type FileFD int

type RecvFlags

type RecvFlags int

type SendFlags

type SendFlags int

type SendToFlags

type SendToFlags int

type SocketFD

type SocketFD int

type Thread

type Thread struct {
	context.Context
	// contains filtered or unexported fields
}

func (*Thread) AfterSend

func (thread *Thread) AfterSend(socketFD SocketFD, extraHeaderSentSize int, bodySentSize int)

func (*Thread) BeforeSend

func (thread *Thread) BeforeSend(socketFD SocketFD, bodySize int, flags SendFlags) ([]byte, int)

func (*Thread) ExportState

func (thread *Thread) ExportState() map[string]interface{}

func (*Thread) IgnoreSocketFD

func (thread *Thread) IgnoreSocketFD(socketFD SocketFD, remoteAddr net.TCPAddr)

func (*Thread) OnAccept

func (thread *Thread) OnAccept(serverSocketFD SocketFD, clientSocketFD SocketFD, addr net.TCPAddr)

func (*Thread) OnAcceptUnix

func (thread *Thread) OnAcceptUnix(serverSocketFD SocketFD, clientSocketFD SocketFD, addr net.UnixAddr)

func (*Thread) OnAccess

func (thread *Thread) OnAccess()

func (*Thread) OnBind

func (thread *Thread) OnBind(socketFD SocketFD, addr net.TCPAddr)

func (*Thread) OnBindUnix

func (thread *Thread) OnBindUnix(socketFD SocketFD, addr net.UnixAddr)

func (*Thread) OnConnect

func (thread *Thread) OnConnect(socketFD SocketFD, remoteAddr net.TCPAddr)

func (*Thread) OnConnectUnix

func (thread *Thread) OnConnectUnix(socketFD SocketFD, remoteAddr net.UnixAddr)

func (*Thread) OnOpenedFile

func (thread *Thread) OnOpenedFile(fileFD FileFD, fileName string, flags int)

func (*Thread) OnOpeningFile

func (thread *Thread) OnOpeningFile(fileName string, flags int) string

func (*Thread) OnRecv

func (thread *Thread) OnRecv(socketFD SocketFD, span []byte, flags RecvFlags) []byte

func (*Thread) OnSend

func (thread *Thread) OnSend(socketFD SocketFD, span []byte, flags SendFlags, extraHeaderSentSize int)

func (*Thread) OnSendTo

func (thread *Thread) OnSendTo(socketFD SocketFD, span []byte, flags SendToFlags, addr net.UDPAddr)

func (*Thread) OnShutdown

func (thread *Thread) OnShutdown()

func (*Thread) OnWrite

func (thread *Thread) OnWrite(fileFD FileFD, content []byte)

type ThreadID

type ThreadID int32

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL