tango.net.http.HttpStack
License:
BSD style:
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(scope int delegate(ref Token) dg);
- Iterate over all tokens in stack
- final void reset();
- Pop the stack all the way back to zero
- final Token findToken(const(char)[] match);
- Scan the tokens looking for the first one with a matching
name. Returns the matching Token, or null if there is no
such match.
- final bool removeToken(const(char)[] match);
- 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.
- final @property int size();
- Return the current stack depth
- final Token push(const(char)[] content);
- Push a new token onto the stack, and set it content to
that provided. Returns the new Token.
- final Token push(ref Token token);
- Push a new token onto the stack, and set it content to
be that of the specified token. Returns the new Token.
- final Token push();
- Push a new token onto the stack, and return it.
- final void pop();
- Pop the stack by one.
- static final bool isMatch(ref Token token, const(char)[] match);
- See if the given token matches the specified text. The
two must match the minimal extent exactly.
- static final void resize(ref Token[] tokens, int size);
- Resize this stack by extending the array.
Page generated by Ddoc. Copyright (c) 2004 Kris Bell. All rights reserved