tango.net.http.HttpStack

License:

BSD style: see license.txt

Version:

Initial release: April 2004

Author:

Kris, John Reimer
class Token #
Internal representation of a token
class HttpStack #
A stack of Tokens, used for capturing http headers. The tokens themselves are typically mapped onto the content of a Buffer, or some other external content, so there's minimal allocation involved (typically zero).
this(int size = 10) #
Construct a HttpStack with the specified initial size. The stack will later be resized as necessary.
HttpStack clone() #
Clone this stack of tokens
int opApply(int delegate(ref Token) dg) #
Iterate over all tokens in stack
void reset() [final] #
Pop the stack all the way back to zero
Token findToken(char[] match) [final] #
Scan the tokens looking for the first one with a matching name. Returns the matching Token, or null if there is no such match.
bool removeToken(char[] match) [final] #
Scan the tokens looking for the first one with a matching name, and remove it. Returns true if a match was found, or false if not.
int size() [final] #
Return the current stack depth
Token push(char[] content) [final] #
Push a new token onto the stack, and set it content to that provided. Returns the new Token.
Token push(ref Token token) [final] #
Push a new token onto the stack, and set it content to be that of the specified token. Returns the new Token.
Token push() [final] #
Push a new token onto the stack, and return it.
void pop() [final] #
Pop the stack by one.
bool isMatch(ref Token token, char[] match) [static, final] #
See if the given token matches the specified text. The two must match the minimal extent exactly.
void resize(ref Token[] tokens, int size) [static, final] #
Resize this stack by extending the array.