Message

Message types

Constructors

this
this(string from, string command, string params)

Constructs a new Message

Members

Functions

encode
string encode(ChecksMode mode)

Encodes this Message into a CRLF delimited byte array

getCommand
string getCommand()

Returns the command name

getFrom
string getFrom()

Returns the sender of the message

getKVPairs
string[string] getKVPairs()

Returns the parameters excluding the trailing text which are seperated by spaces but only those which are key-value pairs

getPairs
string[] getPairs()

Returns the parameters excluding the trailing text which are seperated by spaces

getParams
string getParams()

Returns the optional paremeters (if any)

getReplyType
ReplyType getReplyType()

Returns the type of reply (if this message was a numeric response)

getTrailing
string getTrailing()

Retrieves the trailing text in the paramaters (if any)

isResponseError
bool isResponseError()

Returns whether or not this message is an error kind-of numeric response

isResponseMessage
bool isResponseMessage()

Returns whether or not this message was a numeric response

toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

hasIllegalCharacters
bool hasIllegalCharacters(string input)

Checks whether the provided input string contains any invalid characters

parseReceivedMessage
Message parseReceivedMessage(string message)
Undocumented in source. Be warned that the author may not have intended to support it.
stripIllegalCharacters
string stripIllegalCharacters(string input)

Provided an input string this will strip any illegal characters present within it

Meta