Documentation ¶
Overview ¶
Package limits contains many options for setting Global limits on how the overall application behaves. Many of these options are configured by build tags.
Other functions include re-implemented standard library functions.
Index ¶
Constants ¶
const Frag = 33_554_432
Frag is the max size used to fragment packets into. Any packet over this byte size will be fragmented.
const Packets = 256
Packets determines how many Packets may be processed by the Session thread before waiting another wait cycle. If this is set to anything less than one, only a single Packet will be processed at a time.
Variables ¶
This section is empty.
Functions ¶
func Ignore ¶ added in v0.1.0
func Ignore()
Ignore is a simple helper method that can be used to ignore signals that can be used to abort or generate a stack-trace.
Used for anti-debugging measures.
func MemorySweep ¶ added in v0.0.6
MemorySweep enables the GC memory sweeper, which keeps the process memory clean to prevent any crashes while in DLL format or injected. This function only needs to be called once and will return immediately.
The context is recommended to prevent any leaking Goroutines from being left behind.
Defaults to a time of one minute.
func MemorySweepEx ¶ added in v0.0.6
MemorySweepEx enables the GC memory sweeper, which keeps the process memory clean to prevent any crashes while in DLL format or injected. This function only needs to be called once and will return immediately.
The context is recommended to prevent any leaking Goroutines from being left behind.
Allows for specification of the time span between sweeps.
func Notify ¶ added in v0.2.5
Notify causes package signal to relay incoming signals to c. If no signals are provided, all incoming signals will be relayed to c. Otherwise, just the provided signals will.
Package signal will not block sending to c: the caller must ensure that c has sufficient buffer space to keep up with the expected signal rate. For a channel used for notification of just one signal value, a buffer of size 1 is sufficient.
It is allowed to call Notify multiple times with the same channel: each call expands the set of signals sent to that channel. The only way to remove signals from the set is to call Stop.
It is allowed to call Notify multiple times with different channels and the same signals: each channel receives copies of incoming signals independently.
This version will stop the signal handling loop once the 'StopNotify' function has been called.
func Reset ¶ added in v0.2.0
func Reset()
Reset will undo all the signals ignored by the 'Ignore' function.
func StopNotify ¶ added in v0.2.5
StopNotify will stop the signal handling loop from running and will cause all signal handling to stop.
This function will block until the Goroutine closes.
This function has no effect if the loop is not started or stopped.
The supplied chan can be nil but if non-nil will be passed to 'signal.Stop' for convince.
Types ¶
This section is empty.