Documentation ¶
Index ¶
- Constants
- Variables
- type CoreLexer
- func (this *CoreLexer) AddKeyword(name string, value int)
- func (this *CoreLexer) AddLexer(lexerName string) LexerMap
- func (this *CoreLexer) ByteStringNoComma() string
- func (this *CoreLexer) ByteStringNoSemicolon() string
- func (this *CoreLexer) CharAsString(ch byte) string
- func (this *CoreLexer) Comment() (s string, err error)
- func (this *CoreLexer) CurrentLexer() LexerMap
- func (this *CoreLexer) GetBuffer() string
- func (this *CoreLexer) GetLexerName() string
- func (this *CoreLexer) GetNextId() string
- func (this *CoreLexer) GetNextToken() *Token
- func (this *CoreLexer) GetPtr() int
- func (this *CoreLexer) GetRest() string
- func (this *CoreLexer) GetString(c byte) (s string, err error)
- func (this *CoreLexer) LookupToken(value int) string
- func (this *CoreLexer) MarkInputPosition() int
- func (this *CoreLexer) Match(tok int) (t *Token, ParseException error)
- func (this *CoreLexer) NCharAsString(nchars int) string
- func (this *CoreLexer) Number() (n int, ParseException error)
- func (this *CoreLexer) PeekNextId() string
- func (this *CoreLexer) PeekNextToken() (*Token, error)
- func (this *CoreLexer) PeekNextTokenK(ntokens int) ([]*Token, error)
- func (this *CoreLexer) QuotedString() (s string, err error)
- func (this *CoreLexer) RewindInputPosition(position int)
- func (this *CoreLexer) SPorHT()
- func (this *CoreLexer) SelectLexer(lexerName string)
- func (this *CoreLexer) SetLexerName(lexerName string)
- func (this *CoreLexer) StartsId() bool
- func (this *CoreLexer) Super(lexerName, buffer string)
- func (this *CoreLexer) Ttoken() string
- func (this *CoreLexer) TtokenAllowSpace() string
- type CoreParser
- func (this *CoreParser) Dbg_enter(rule string)
- func (this *CoreParser) Dbg_leave(rule string)
- func (this *CoreParser) GetLexer() Lexer
- func (this *CoreParser) NameValue(separator byte) (nv *NameValue, ParseException error)
- func (this *CoreParser) PeekLine(rule string)
- func (this *CoreParser) SetLexer(lexer Lexer)
- func (this *CoreParser) Super(buffer string)
- type Debugger
- type Host
- func (this *Host) Clone() interface{}
- func (this *Host) GetAddress() string
- func (this *Host) GetHostName() string
- func (this *Host) GetInetAddress() net.IP
- func (this *Host) GetIpAddress() string
- func (this *Host) IsHostName() bool
- func (this *Host) IsIPAddress() bool
- func (this *Host) SetAddress(address string)
- func (this *Host) SetHostAddress(address string)
- func (this *Host) SetHostName(hname string)
- func (this *Host) String() string
- type HostNameParser
- type HostPort
- func (this *HostPort) Clone() interface{}
- func (this *HostPort) GetHost() *Host
- func (this *HostPort) GetInetAddress() net.IP
- func (this *HostPort) GetPort() int
- func (this *HostPort) HasPort() bool
- func (this *HostPort) RemovePort()
- func (this *HostPort) SetHost(h *Host)
- func (this *HostPort) SetPort(p int)
- func (this *HostPort) String() string
- type Lexer
- type LexerMap
- type LogWriter
- type NameValue
- func (this *NameValue) Clone() interface{}
- func (this *NameValue) GetName() string
- func (this *NameValue) GetValue() interface{}
- func (this *NameValue) IsValueQuoted() bool
- func (this *NameValue) SetName(n string)
- func (this *NameValue) SetQuotedValue()
- func (this *NameValue) SetSeparator(sep string)
- func (this *NameValue) SetValue(v interface{})
- func (this *NameValue) String() string
- type NameValueList
- func (this *NameValueList) AddNameAndValue(name string, value interface{})
- func (this *NameValueList) AddNameValue(nv *NameValue)
- func (this *NameValueList) Clone() interface{}
- func (this *NameValueList) Concatenate(nvl *NameValueList, topFlag bool)
- func (this *NameValueList) Delete(name string) bool
- func (this *NameValueList) GetIndentation() string
- func (this *NameValueList) GetNameValue(name string) *NameValue
- func (this *NameValueList) GetNames() *list.List
- func (this *NameValueList) GetParameter(name string) string
- func (this *NameValueList) GetValue(name string) interface{}
- func (this *NameValueList) HasNameValue(name string) bool
- func (this *NameValueList) SetNameAndValue(name string, value interface{})
- func (this *NameValueList) SetNameValue(nv *NameValue)
- func (this *NameValueList) SetSeparator(sep string)
- func (this *NameValueList) Sprint(s string)
- func (this *NameValueList) String() string
- type StringTokenizer
- func (this *StringTokenizer) Consume()
- func (this *StringTokenizer) ConsumeK(k int)
- func (this *StringTokenizer) GetLine() string
- func (this *StringTokenizer) GetLines() map[int]string
- func (this *StringTokenizer) GetNextChar() (byte, error)
- func (this *StringTokenizer) GetNextTokenByDelim(delim byte) (string, error)
- func (this *StringTokenizer) GetSDPFieldName(line string) string
- func (this *StringTokenizer) HasMoreChars() bool
- func (this *StringTokenizer) IsAlpha(ch byte) bool
- func (this *StringTokenizer) IsDigit(ch byte) bool
- func (this *StringTokenizer) IsHexDigit(ch byte) bool
- func (this *StringTokenizer) LookAhead() (byte, error)
- func (this *StringTokenizer) LookAheadK(k int) (byte, error)
- func (this *StringTokenizer) NextToken() string
- func (this *StringTokenizer) PeekLine() string
- type Token
Constants ¶
const ( HOSTNAME = iota IPV4ADDRESS IPV6ADDRESS )
const CORELEXER_ALPHA = CORELEXER_END + 3
const CORELEXER_AND = (int)('&')
const CORELEXER_AT = (int)('@')
const CORELEXER_BACKSLASH = (int)('\\')
const CORELEXER_BACK_QUOTE = (int)('`')
const CORELEXER_BAR = (int)('|')
const CORELEXER_COLON = (int)(':')
const CORELEXER_DIGIT = CORELEXER_END + 2
const CORELEXER_DOLLAR = (int)('$')
const CORELEXER_DOT = (int)('.')
const CORELEXER_DOUBLEQUOTE = (int)('"')
const CORELEXER_END = CORELEXER_START + 2048
const CORELEXER_EQUALS = (int)('=')
const CORELEXER_EXCLAMATION = (int)('!')
const CORELEXER_GREATER_THAN = (int)('>')
const CORELEXER_HAT = (int)('^')
const CORELEXER_HT = (int)('\t')
const CORELEXER_ID = CORELEXER_END - 1 // IMPORTANT -- This should be < END
const CORELEXER_LESS_THAN = (int)('<')
const CORELEXER_LPAREN = (int)('(')
const CORELEXER_L_CURLY = (int)('{')
const CORELEXER_L_SQUARE_BRACKET = (int)('[')
const CORELEXER_MINUS = (int)('-')
const CORELEXER_NULL = (int)(0) //('\0') ;
const CORELEXER_PERCENT = (int)('%')
const CORELEXER_PLUS = (int)('+')
const CORELEXER_POUND = (int)('#')
const CORELEXER_QUESTION = (int)('?')
const CORELEXER_QUOTE = (int)('\'')
const CORELEXER_RPAREN = (int)(')')
const CORELEXER_R_CURLY = (int)('}')
const CORELEXER_R_SQUARE_BRACKET = (int)(']')
const CORELEXER_SEMICOLON = (int)(';')
const CORELEXER_SLASH = (int)('/')
const CORELEXER_SP = (int)(' ')
const CORELEXER_STAR = (int)('*')
const CORELEXER_START = 2048
* A lexical analyzer that is used by all parsers in our implementation.
IMPORTANT - All keyword matches should be between START and END
const CORELEXER_TILDE = (int)('~')
const CORELEXER_UNDERSCORE = (int)('_')
const CORELEXER_WHITESPACE = CORELEXER_END + 1
Individial token classes.
const SIPCalendar_AM = 0
const SIPCalendar_AM_PM = 9
const SIPCalendar_APRIL = 3
const SIPCalendar_AUGUST = 7
const SIPCalendar_DATE = 5
const SIPCalendar_DAY_OF_MONTH = 5
const SIPCalendar_DAY_OF_WEEK = 7
const SIPCalendar_DAY_OF_WEEK_IN_MONTH = 8
const SIPCalendar_DAY_OF_YEAR = 6
const SIPCalendar_DECEMBER = 11
const SIPCalendar_DST_OFFSET = 16
const SIPCalendar_ERA = 0
const SIPCalendar_FEBRUARY = 1
const SIPCalendar_FIELD_COUNT = 17
const SIPCalendar_FRIDAY = 6
const SIPCalendar_HOUR = 10
const SIPCalendar_HOUR_OF_DAY = 11
const SIPCalendar_JANUARY = 0
const SIPCalendar_JULY = 6
const SIPCalendar_JUNE = 5
const SIPCalendar_MARCH = 2
const SIPCalendar_MAY = 4
const SIPCalendar_MILLISECOND = 14
const SIPCalendar_MINUTE = 12
const SIPCalendar_MONDAY = 2
const SIPCalendar_MONTH = 2
const SIPCalendar_NOVEMBER = 10
const SIPCalendar_OCTOBER = 9
const SIPCalendar_PM = 1
const SIPCalendar_SATURDAY = 7
const SIPCalendar_SECOND = 13
const SIPCalendar_SEPTEMBER = 8
const SIPCalendar_SUNDAY = 1
const SIPCalendar_THURSDAY = 5
const SIPCalendar_TUESDAY = 3
const SIPCalendar_UNDECIMBER = 12
const SIPCalendar_WEDNESDAY = 4
const SIPCalendar_WEEK_OF_MONTH = 4
const SIPCalendar_WEEK_OF_YEAR = 3
const SIPCalendar_YEAR = 1
const SIPCalendar_ZONE_OFFSET = 15
const SIPDateNames_APR = "Apr"
const SIPDateNames_AUG = "Aug"
const SIPDateNames_DEC = "Dec"
const SIPDateNames_FEB = "Feb"
const SIPDateNames_FRI = "Fri"
const SIPDateNames_GMT = "GMT"
const SIPDateNames_JAN = "Jan"
const SIPDateNames_JUL = "Jul"
const SIPDateNames_JUN = "Jun"
const SIPDateNames_MAR = "Mar"
const SIPDateNames_MAY = "May"
const SIPDateNames_MON = "Mon"
const SIPDateNames_NOV = "Nov"
const SIPDateNames_OCT = "Oct"
const SIPDateNames_SAT = "Sat"
const SIPDateNames_SEP = "Sep"
const SIPDateNames_SUN = "Sun"
const SIPDateNames_THU = "Thu"
const SIPDateNames_TUE = "Tue"
const SIPDateNames_WED = "Wed"
const SIPHeaderNames_ACCEPT = "Accept" //11
const SIPHeaderNames_ACCEPT_ENCODING = "Accept-Encoding" //10
const SIPHeaderNames_ACCEPT_LANGUAGE = "Accept-Language" //12
const SIPHeaderNames_ALERT_INFO = "Alert-Info" //9
const SIPHeaderNames_ALLOW = "Allow" //5
const SIPHeaderNames_ALLOW_EVENTS = "Allow-Events" //45
const SIPHeaderNames_AUTHENTICATION_INFO = "Authentication-Info" //43
const SIPHeaderNames_AUTHORIZATION = "Authorization" //19
const SIPHeaderNames_C = "C"
const SIPHeaderNames_CALL_ID = "Call-ID" //18
const SIPHeaderNames_CALL_INFO = "Call-Info" //7
const SIPHeaderNames_CONTACT = "Contact" //28
const SIPHeaderNames_CONTENT_DISPOSITION = "Content-Disposition" //35
const SIPHeaderNames_CONTENT_ENCODING = "Content-Encoding" //25
const SIPHeaderNames_CONTENT_LANGUAGE = "Content-Language" //6
const SIPHeaderNames_CONTENT_LENGTH = "Content-Length" //26
const SIPHeaderNames_CONTENT_TYPE = "Content-Type" //24
const SIPHeaderNames_CSEQ = "CSeq" //8
const SIPHeaderNames_DATE = "Date" //40
const SIPHeaderNames_E = "E"
const SIPHeaderNames_ERROR_INFO = "Error-Info" //2
const SIPHeaderNames_EVENT = "Event" //44
const SIPHeaderNames_EXPIRES = "Expires" //41
const SIPHeaderNames_F = "F"
const SIPHeaderNames_FROM = "From" //17
const SIPHeaderNames_I = "I"
const SIPHeaderNames_IN_REPLY_TO = "In-Reply-To" //4
const SIPHeaderNames_K = "K"
const SIPHeaderNames_L = "L"
const SIPHeaderNames_M = "M"
const SIPHeaderNames_MAX_FORWARDS = "Max-Forwards" //30
const SIPHeaderNames_MIME_VERSION = "MIME-Version" //3
const SIPHeaderNames_MIN_EXPIRES = "Min-Expires" //1
const SIPHeaderNames_ORGANIZATION = "Organization" //31
const SIPHeaderNames_PRIORITY = "Priority" //39
const SIPHeaderNames_PROXY_AUTHENTICATE = "Proxy-Authenticate" //20
const SIPHeaderNames_PROXY_AUTHORIZATION = "Proxy-Authorization" //32
const SIPHeaderNames_PROXY_REQUIRE = "Proxy-Require" //33
const SIPHeaderNames_R = "R"
const SIPHeaderNames_RACK = "RAck" //45
const SIPHeaderNames_REASON = "Reason" //47
const SIPHeaderNames_RECORD_ROUTE = "Record-Route" //13
const SIPHeaderNames_REFER_TO = "Refer-To" //46
const SIPHeaderNames_REPLY_TO = "Reply-To" //44
const SIPHeaderNames_REQUIRE = "Require" //34
const SIPHeaderNames_RETRY_AFTER = "Retry-After" //23
const SIPHeaderNames_ROUTE = "Route" //27
const SIPHeaderNames_RSEQ = "RSeq" //46
const SIPHeaderNames_S = "S"
const SIPHeaderNames_SERVER = "Server" //21
const SIPHeaderNames_SUBJECT = "Subject" //36
const SIPHeaderNames_SUBSCRIPTION_STATE = "Subscription-State" //48
const SIPHeaderNames_SUPPORTED = "Supported" //42
const SIPHeaderNames_T = "T"
const SIPHeaderNames_TIMESTAMP = "Timestamp" //14
const SIPHeaderNames_TO = "To" //15
const SIPHeaderNames_UNSUPPORTED = "Unsupported" //22
const SIPHeaderNames_USER_AGENT = "User-Agent" //37
const SIPHeaderNames_V = "V"
const SIPHeaderNames_VIA = "Via" //16
const SIPHeaderNames_WARNING = "Warning" //38
const SIPHeaderNames_WWW_AUTHENTICATE = "WWW-Authenticate" //29
const SIPMethodNames_ACK = "ACK"
const SIPMethodNames_BYE = "BYE"
const SIPMethodNames_INVITE = "INVITE"
const SIPMethodNames_MESSAGE = "MESSAGE"
const SIPMethodNames_NOTIFY = "NOTIFY"
const SIPMethodNames_OPTIONS = "OPTIONS"
const SIPMethodNames_REGISTER = "REGISTER"
const SIPMethodNames_SUBSCRIBE = "SUBSCRIBE"
const SIPParameters_ACTION = "action"
const SIPParameters_ALERT = "alert"
const SIPParameters_ALGORITHM = "algorithm"
const SIPParameters_BRANCH = "branch"
const SIPParameters_CARD = "card"
const SIPParameters_CAUSE = "cause"
const SIPParameters_CNONCE = "cnonce"
const SIPParameters_COOKIE = "cookie"
const SIPParameters_DIGEST = "Digest"
const SIPParameters_DOMAIN = "domain"
const SIPParameters_DURATION = "duration"
const SIPParameters_EMERGENCY = "emergency"
const SIPParameters_EXPIRES = "expires"
const SIPParameters_HANDLING = "handling"
const SIPParameters_HIDDEN = "hidden"
const SIPParameters_ICON = "icon"
const SIPParameters_ID = "id"
const SIPParameters_INFO = "info"
const SIPParameters_MADDR = "maddr"
const SIPParameters_NC = "nc"
const SIPParameters_NEXT_NONCE = "nextnonce"
Issue reported by larryb
const SIPParameters_NONCE = "nonce"
const SIPParameters_NONCE_COUNT = "nc"
Issue reported by larryb
const SIPParameters_NON_URGENT = "non-urgent"
const SIPParameters_NORMAL = "normal"
const SIPParameters_OPAQUE = "opaque"
const SIPParameters_OPTIONAL = "optional"
const SIPParameters_PASSWORD = "password"
const SIPParameters_PROXY = "proxy"
const SIPParameters_PUBKEY = "pubkey"
const SIPParameters_PURPOSE = "purpose"
const SIPParameters_Q = "q"
const SIPParameters_QOP = "qop"
const SIPParameters_REALM = "realm"
const SIPParameters_RECEIVED = "received"
const SIPParameters_REDIRECT = "redirect"
const SIPParameters_RENDER = "render"
const SIPParameters_REQUIRED = "required"
const SIPParameters_RESPONSE = "response"
const SIPParameters_RESPONSE_AUTH = "rspauth"
const SIPParameters_SESSION = "session"
const SIPParameters_SIGNATURE = "signature"
const SIPParameters_SIGNED_BY = "signed-by"
const SIPParameters_STALE = "stale"
const SIPParameters_TAG = "tag"
const SIPParameters_TEXT = "text"
const SIPParameters_TRANSPORT = "transport"
const SIPParameters_TTL = "ttl"
const SIPParameters_URGENT = "urgent"
const SIPParameters_URI = "uri"
const SIPParameters_USERNAME = "username"
const SIPParameters_VERSION = "version"
const SIPSeparatorNames_AND = "&"
const SIPSeparatorNames_AT = "@"
const SIPSeparatorNames_COLON = ":"
const SIPSeparatorNames_COMMA = ","
const SIPSeparatorNames_DOT = "."
const SIPSeparatorNames_DOUBLE_QUOTE = "\""
const SIPSeparatorNames_EQUALS = "="
const SIPSeparatorNames_GREATER_THAN = ">"
const SIPSeparatorNames_HT = "\t"
const SIPSeparatorNames_LESS_THAN = "<"
const SIPSeparatorNames_LPAREN = "("
const SIPSeparatorNames_NEWLINE = "\r\n"
const SIPSeparatorNames_PERCENT = "%"
const SIPSeparatorNames_POUND = "#"
const SIPSeparatorNames_QUESTION = "?"
const SIPSeparatorNames_QUOTE = "'" //\'
const SIPSeparatorNames_RETURN = "\n"
const SIPSeparatorNames_RPAREN = ")"
const SIPSeparatorNames_SEMICOLON = ";"
const SIPSeparatorNames_SLASH = "/"
const SIPSeparatorNames_SP = " "
const SIPSeparatorNames_STAR = "*"
const SIPTransportNames_ISUB = "isub"
const SIPTransportNames_LR = "lr"
const SIPTransportNames_MADDR = "maddr"
const SIPTransportNames_METHOD = "method"
const SIPTransportNames_PHONE = "phone"
const SIPTransportNames_PHONE_CONTEXT_TAG = "context-tag"
const SIPTransportNames_POSTDIAL = "postdial"
const SIPTransportNames_PROVIDER_TAG = "provider-tag"
const SIPTransportNames_SIP = "sip"
const SIPTransportNames_SIPS = "sips"
const SIPTransportNames_TCP = "tcp"
const SIPTransportNames_TEL = "tel"
const SIPTransportNames_TRANSPORT = "transport"
const SIPTransportNames_TTL = "ttl"
const SIPTransportNames_UDP = "udp"
const SIPTransportNames_USER = "user"
const TRACE_DEBUG = 32
* Debug trace level (all tracing enabled).
const TRACE_EXCEPTION = 17
* Trace exception processing
const TRACE_MESSAGES = 16
* Trace message processing
const TRACE_NONE = 0
* * Log System Errors. Also used for debugging log.
* Dont trace
Variables ¶
var Debug = Debugger{true, false}
var LogWrite = LogWriter{nil, TRACE_NONE, "debug.log", false, 0}
Functions ¶
This section is empty.
Types ¶
type CoreLexer ¶
type CoreLexer struct { StringTokenizer // contains filtered or unexported fields }
func NewCoreLexer ¶
func (*CoreLexer) AddKeyword ¶
func (*CoreLexer) ByteStringNoComma ¶
func (*CoreLexer) ByteStringNoSemicolon ¶
func (*CoreLexer) CharAsString ¶
func (*CoreLexer) CurrentLexer ¶
func (*CoreLexer) GetLexerName ¶
func (*CoreLexer) GetNextToken ¶
call this after you call match
func (*CoreLexer) GetString ¶
* Get the sub-String until the character is encountered.
- Acknowledgement - Sylvian Corre submitted a bug fix for this
- method.
- @param char c the character to match
- @return matching string.
func (*CoreLexer) LookupToken ¶
func (*CoreLexer) MarkInputPosition ¶
* Mark the position for backtracking.
func (*CoreLexer) Match ¶
* Match the given token or throw an exception if no such token
- can be matched.
func (*CoreLexer) NCharAsString ¶
* Lookahead in the inputBuffer for n chars and return as a string.
- Do not consume the input.
func (*CoreLexer) PeekNextId ¶
* Peek the next id but dont move the buffer pointer forward.
func (*CoreLexer) PeekNextToken ¶
* Look ahead for one token.
func (*CoreLexer) PeekNextTokenK ¶
func (*CoreLexer) QuotedString ¶
Assume the cursor is at a quote.
func (*CoreLexer) RewindInputPosition ¶
* Rewind the input ptr to the marked position.
func (*CoreLexer) SelectLexer ¶
func (*CoreLexer) SetLexerName ¶
func (*CoreLexer) TtokenAllowSpace ¶
type CoreParser ¶
type CoreParser struct {
// contains filtered or unexported fields
}
* Generic parser class. * All parsers inherit this class.
func NewCoreParser ¶
func NewCoreParser(buffer string) *CoreParser
func (*CoreParser) Dbg_enter ¶
func (this *CoreParser) Dbg_enter(rule string)
func (*CoreParser) Dbg_leave ¶
func (this *CoreParser) Dbg_leave(rule string)
func (*CoreParser) GetLexer ¶
func (this *CoreParser) GetLexer() Lexer
func (*CoreParser) NameValue ¶
func (this *CoreParser) NameValue(separator byte) (nv *NameValue, ParseException error)
func (*CoreParser) PeekLine ¶
func (this *CoreParser) PeekLine(rule string)
func (*CoreParser) SetLexer ¶
func (this *CoreParser) SetLexer(lexer Lexer)
func (*CoreParser) Super ¶
func (this *CoreParser) Super(buffer string)
type Host ¶
type Host struct {
// contains filtered or unexported fields
}
func (*Host) GetInetAddress ¶
* Get the inet address from this host.
- Caches the inet address returned from dns lookup to avoid
- lookup delays. * *@throws UnkownHostexception when the host name cannot be resolved.
func (*Host) GetIpAddress ¶
*
- Convenience function to get the raw IP destination address
- of a SIP message as a String.
- @return String
func (*Host) IsHostName ¶
* Return true if the address is a DNS host name
- (and not an IPV4 address) *@return true if the hostname is a DNS name
func (*Host) IsIPAddress ¶
* Return true if the address is a DNS host name
- (and not an IPV4 address) *@return true if the hostname is host address.
func (*Host) SetHostAddress ¶
- Set the IP Address. *@param address is the address string to set.
type HostNameParser ¶
type HostNameParser struct {
CoreParser
}
* SIPParser for host names.
func NewHostNameParser ¶
func NewHostNameParser(hname string) *HostNameParser
func NewHostNameParserFromLexer ¶
func NewHostNameParserFromLexer(lexer Lexer) *HostNameParser
* The lexer is initialized with the buffer.
func (*HostNameParser) DomainLabel ¶
func (this *HostNameParser) DomainLabel() (s string, ParseException error)
func (*HostNameParser) GetHost ¶
func (this *HostNameParser) GetHost() (h *Host, err error)
func (*HostNameParser) GetHostPort ¶
func (this *HostNameParser) GetHostPort() (hp *HostPort, ParseException error)
func (*HostNameParser) Ipv6Reference ¶
func (this *HostNameParser) Ipv6Reference() (s string, ParseException error)
type HostPort ¶
type HostPort struct {
// contains filtered or unexported fields
}
func (*HostPort) GetInetAddress ¶
- Return the internet address corresponding to the host. *@throws java.net.UnkownHostException if host name cannot be resolved. *@return the inet address for the host.
func (*HostPort) HasPort ¶
*
- Returns boolean value indicating if Header has port
- @return boolean value indicating if Header has port
type Lexer ¶
type Lexer interface { //StringTokenizer Consume() ConsumeK(k int) HasMoreChars() bool IsAlpha(ch byte) bool IsDigit(ch byte) bool IsHexDigit(ch byte) bool LookAhead() (byte, error) LookAheadK(k int) (byte, error) PeekLine() string GetLine() string GetNextTokenByDelim(delim byte) (string, error) //Lexer SetLexerName(lexerName string) GetLexerName() string AddKeyword(name string, value int) AddLexer(lexerName string) LexerMap ByteStringNoComma() string ByteStringNoSemicolon() string CharAsString(ch byte) string NCharAsString(nchars int) string Comment() (s string, ParseException error) CurrentLexer() LexerMap GetBuffer() string GetNextId() string GetNextToken() *Token GetPtr() int GetRest() string GetString(c byte) (s string, ParseException error) LookupToken(value int) string MarkInputPosition() int Match(tok int) (t *Token, ParseException error) Number() (n int, ParseException error) PeekNextId() string PeekNextToken() (*Token, error) PeekNextTokenK(ntokens int) ([]*Token, error) QuotedString() (s string, ParseException error) RewindInputPosition(position int) SPorHT() SelectLexer(lexerName string) StartsId() bool Ttoken() string TtokenAllowSpace() string }
type LogWriter ¶
type LogWriter struct {
// contains filtered or unexported fields
}
* Name of the log file in which the trace is written out
- (default is /tmp/sipserverlog.txt)
func (*LogWriter) GetTraceLevel ¶
* Get the trace level for the stack.
func (*LogWriter) LogMessage ¶
* Log a message into the log file.
- @param message message to log into the log file.
func (*LogWriter) LogMessageToFile ¶
func (*LogWriter) SetLogFileName ¶
* Set the log file name *@param name is the name of the log file to set.
func (*LogWriter) SetTraceLevel ¶
* Set the trace level for the stack.
type NameValue ¶
type NameValue struct {
// contains filtered or unexported fields
}
func NewNameValue ¶
func (*NameValue) IsValueQuoted ¶
* Return true if the value is quoted in doublequotes.
func (*NameValue) SetQuotedValue ¶
func (this *NameValue) SetQuotedValue()
* A flag that indicates that doublequotes should be put around the * value when encoded *(for example name=value when value is doublequoted).
func (*NameValue) SetSeparator ¶
* * Set the separator for the encoding method below.
type NameValueList ¶
func NewNameValueList ¶
func NewNameValueList(listName string) *NameValueList
func (*NameValueList) AddNameAndValue ¶
func (this *NameValueList) AddNameAndValue(name string, value interface{})
* * Add a name value record to this list.
func (*NameValueList) AddNameValue ¶
func (this *NameValueList) AddNameValue(nv *NameValue)
func (*NameValueList) Clone ¶
func (this *NameValueList) Clone() interface{}
func (*NameValueList) Concatenate ¶
func (this *NameValueList) Concatenate(nvl *NameValueList, topFlag bool)
func (*NameValueList) Delete ¶
func (this *NameValueList) Delete(name string) bool
* * Remove the element corresponding to this name. * @since 1.0
func (*NameValueList) GetIndentation ¶
func (this *NameValueList) GetIndentation() string
func (*NameValueList) GetNameValue ¶
func (this *NameValueList) GetNameValue(name string) *NameValue
* * Get the NameValue record given a name. * @since 1.0
func (*NameValueList) GetNames ¶
func (this *NameValueList) GetNames() *list.List
*
*Get a list of parameter names. *@return a list iterator that has the names of the parameters.
func (*NameValueList) GetParameter ¶
func (this *NameValueList) GetParameter(name string) string
- Get the parameter as a String. *@return the parameter as a string.
func (*NameValueList) GetValue ¶
func (this *NameValueList) GetValue(name string) interface{}
* * Do a lookup on a given name and return value associated with it.
func (*NameValueList) HasNameValue ¶
func (this *NameValueList) HasNameValue(name string) bool
* * Returns a boolean telling if this NameValueList * has a record with this name * @since 1.0
func (*NameValueList) SetNameAndValue ¶
func (this *NameValueList) SetNameAndValue(name string, value interface{})
* * Set a namevalue object in this list.
func (*NameValueList) SetNameValue ¶
func (this *NameValueList) SetNameValue(nv *NameValue)
* * Set a namevalue object in this list.
func (*NameValueList) SetSeparator ¶
func (this *NameValueList) SetSeparator(sep string)
*
- Set the separator (for encoding the list)
- @since v1.0
- @param sep is the new seperator (default is semicolon)
func (*NameValueList) Sprint ¶
func (this *NameValueList) Sprint(s string)
func (*NameValueList) String ¶
func (this *NameValueList) String() string
*
- Encode the list in semicolon separated form.
- @return an encoded string containing the objects in this list.
- @since v1.0
type StringTokenizer ¶
type StringTokenizer struct {
// contains filtered or unexported fields
}
* Base string token splitter.
func NewStringTokenizer ¶
func NewStringTokenizer(buffer string) *StringTokenizer
func (*StringTokenizer) Consume ¶
func (this *StringTokenizer) Consume()
func (*StringTokenizer) ConsumeK ¶
func (this *StringTokenizer) ConsumeK(k int)
func (*StringTokenizer) GetLine ¶
func (this *StringTokenizer) GetLine() string
func (*StringTokenizer) GetLines ¶
func (this *StringTokenizer) GetLines() map[int]string
* Get a Vector of the buffer tokenized by lines
func (*StringTokenizer) GetNextChar ¶
func (this *StringTokenizer) GetNextChar() (byte, error)
func (*StringTokenizer) GetNextTokenByDelim ¶
func (this *StringTokenizer) GetNextTokenByDelim(delim byte) (string, error)
* Get the next token from the buffer.
func (*StringTokenizer) GetSDPFieldName ¶
func (this *StringTokenizer) GetSDPFieldName(line string) string
* get the SDP field name of the line
- @return String
func (*StringTokenizer) HasMoreChars ¶
func (this *StringTokenizer) HasMoreChars() bool
func (*StringTokenizer) IsAlpha ¶
func (this *StringTokenizer) IsAlpha(ch byte) bool
func (*StringTokenizer) IsDigit ¶
func (this *StringTokenizer) IsDigit(ch byte) bool
func (*StringTokenizer) IsHexDigit ¶
func (this *StringTokenizer) IsHexDigit(ch byte) bool
func (*StringTokenizer) LookAhead ¶
func (this *StringTokenizer) LookAhead() (byte, error)
func (*StringTokenizer) LookAheadK ¶
func (this *StringTokenizer) LookAheadK(k int) (byte, error)
func (*StringTokenizer) NextToken ¶
func (this *StringTokenizer) NextToken() string
func (*StringTokenizer) PeekLine ¶
func (this *StringTokenizer) PeekLine() string
type Token ¶
type Token struct {
// contains filtered or unexported fields
}