ddn.util.monaco.common

Types 13

classMonacoException : Exception

Base exception for all monaco errors.

All exceptions thrown by the monaco library inherit from this class.

Constructors
this(string msg, string file = __FILE__, size_t line = __LINE__)Constructs a new MonacoException.

Exception thrown when a process is not found or has terminated.

Constructors
this(int pid, string file = __FILE__, size_t line = __LINE__)Constructs a new NoSuchProcess exception.

Exception thrown when insufficient permissions are available to access a resource.

Constructors
this(string resource, string file = __FILE__, size_t line = __LINE__)Constructs a new AccessDenied exception.

Exception thrown when an operation times out.

Constructors
this(string operation, string file = __FILE__, size_t line = __LINE__)Constructs a new TimeoutExpired exception.

Exception thrown when a system resource is temporarily unavailable.

Constructors
this(string resource, string file = __FILE__, size_t line = __LINE__)Constructs a new ResourceUnavailable exception.

Exception thrown when attempting to operate on a zombie process.

Zombie processes are terminated processes that haven't been reaped by their parent.

Constructors
this(int pid, string file = __FILE__, size_t line = __LINE__)Constructs a new ZombieProcess exception.

Exception thrown when attempting to operate on a kernel process.

Kernel processes run in kernel space and cannot be accessed like normal processes.

Constructors
this(int pid, string file = __FILE__, size_t line = __LINE__)Constructs a new KernelProcess exception.

Exception thrown when an invalid process ID is provided.

Invalid PIDs are negative numbers, non-numeric values, or PIDs outside valid range.

Constructors
this(int pid, string reason = null, string file = __FILE__, size_t line = __LINE__)Constructs a new InvalidPID exception.

Exception thrown when a feature is not supported on the current platform.

Some operations are only available on specific platforms.

Constructors
this(string feature, string platform = null, string file = __FILE__, size_t line = __LINE__)Constructs a new PlatformNotSupported exception.

Exception thrown when a process terminates during an operation.

This can happen when a process exits while being queried or monitored.

Constructors
this(int pid, string operation, string file = __FILE__, size_t line = __LINE__)Constructs a new ProcessTerminated exception.

Process status enumeration.

Represents the various states a process can be in.

RUNNINGProcess is currently running
SLEEPINGProcess is sleeping (interruptible)
DISK_SLEEPProcess is sleeping (uninterruptible disk sleep)
STOPPEDProcess is stopped (by a signal)
TRACING_STOPProcess is stopped for tracing (debugging)
ZOMBIEProcess is a zombie (terminated but not reaped)
DEADProcess is dead
WAKE_KILLProcess is waking up to be killed
WAKINGProcess is waking up
IDLEProcess is idle
LOCKEDProcess is locked in memory
WAITINGProcess is waiting (BSD-specific)
SUSPENDEDProcess is suspended (Windows-specific)

Network connection status enumeration.

Represents the various states a network connection can be in.

ESTABLISHEDConnection is established
SYN_SENTConnection attempt in progress (SYN sent)
SYN_RECVConnection attempt received (SYN received)
FIN_WAIT1Connection is closing (FIN sent, waiting for ACK)
FIN_WAIT2Connection is closing (FIN received, waiting for FIN)
TIME_WAITConnection is closed, waiting for delayed packets
CLOSEConnection is closed
CLOSE_WAITConnection is closing (received FIN, waiting for application)
LAST_ACKConnection is closing (waiting for final ACK)
LISTENConnection is listening for incoming connections
CLOSINGConnection is closing (both sides closing simultaneously)
NONENo connection state

Address family enumeration.

Represents the different types of network addresses.

INETIPv4 address family
INET6IPv6 address family
UNIXUnix domain socket address family
LINKLink layer address family (MAC addresses)

Functions 4

fnPlatform currentPlatform() @safe @nogc nothrowGets the current platform.
fnbool isValidEnum(E)(E value) if (is(E == enum)) @safe @nogc nothrowChecks if a value is a valid enum member.
fnstring enumToString(E)(E value) if (is(E == enum)) @safeConverts an enum value to its string representation.
fnvoid enforceMonaco(bool condition, string message, string file = __FILE__, size_t line = __LINE__) @safeEnforces that a condition is true, throwing a MonacoException if not.