rfc2259.txt
来自「<VC++网络游戏建摸与实现>源代码」· 文本 代码 · 共 1,684 行 · 第 1/4 页
TXT
1,684 行
RFC 2259 SNQP January 1998 is unknown or unsupported. "Default" and "CCSO" are defined comparison types. The default equality comparison is exact string matching. The query string may include "*" wildcards which match any substring within the response string. The CCSO equality comparison matches words within strings. Each word in the query string for an attribute must appear in some order in the response string. Words are delimited by blank, comma, colon, semi-colon, tab, and newline. The wildcard "*" matches any substring within a word. Both string and word comparisons are case insensitive.3.4 Help --------------------------------------------------------------------- HELP 210-The following commands are available: 210-<comma-separated-command-list> 210 <comma-separated-command-list> HELP <COMMAND> 210-<explanation of <COMMAND>> 210 <explanation of <COMMAND>> 500 Sorry, no help available for "<COMMAND>" --------------------------------------------------------------------- The help command returns the list of available commands. If some commands are not supported, for example advice, they should not be listed. Use of unsupported commands should still return an informative error message. Help can be followed by a command name for information on that command. If no help is available for a command or the command does not exist, Reply 500 is returned.3.5 Imagui --------------------------------------------------------------------- IMAGUI 215 GUI responses enabled --------------------------------------------------------------------- The imagui command informs the server that the client is a graphical user interface (GUI). The client requests more comprehensive, program-oriented errors and progress reports. It replies that GUI responses are enabled. See Section 4 for more information on GUI responses.Elliott & Ordille Informational [Page 16]RFC 2259 SNQP January 19983.6 Next --------------------------------------------------------------------- NEXT 353 Starting next query. Any pending responses discarded. 450 No query in progress --------------------------------------------------------------------- The next command stops processing of the current SQL query. It starts the next SQL query in the block submitted with the last query command. If none remain, the query command is completed. An error is returned if no query is in progress.3.7 Noadvice --------------------------------------------------------------------- NOADVICE 216 Query responses enabled. Advice disabled. --------------------------------------------------------------------- The noadvice command disables advice for query commands. It activates query searches, so queries will return responses. See the advice command for more information.3.8 Noimagui --------------------------------------------------------------------- NOIMAGUI 215 GUI responses disabled --------------------------------------------------------------------- The noimagui command disables detailed messages to a graphical user interface program. It replies that GUI responses are disabled. See Section 4 for more information on GUI responses.3.9 Query The query command behaves differently depending on whether responses or advice are enabled. We first describe the submission of a query and the possible immediate error responses. We then describe theElliott & Ordille Informational [Page 17]RFC 2259 SNQP January 1998 possible replies to the query command when responses are enabled. We finish by describing the possible replies to the query command when advice is enabled. --------------------------------------------------------------------- QUERY <TIME> 350 Send query text, end with . 450 Query already in progress 552 Query blocks are limited to one SQL query 556 T-bounds not supported --------------------------------------------------------------------- The query command submits a block of SQL queries to the SNQP server. Each SQL query must be terminated with a semi-colon, and the entire block is terminated with a line containing a single period. Special characters in query string constants can be included using the C language conventions, e.g. "\n" is the newline character. Since a variety of cached information can be used in processing the SQL queries, the user may ask for answers that are more recent than <TIME>. The SNQP server will endeavor to provide this information. Accepting requests to improve a t-bound is optional for SNQP servers. If a query command is already in process, the entire block is refused. If multiple SQL queries are submitted in one block to a server that does not support multi-query blocks, an error is returned. If <TIME> is submitted when t-bounds are not supported, an error is returned. --------------------------------------------------------------------- 351 Partial response follows ended with . 352 Beginning next query. Previous query current through <TIME>. 250 All queries processed. Current through <TIME>. 653 <Communications err> with <location> <location description> 660 <Error> from <location> <location description> 700 <SQL query parsing error> 750 <SQL query semantic error> 761 <Requirements Error> for <location> <location description> ---------------------------------------------------------------------Elliott & Ordille Informational [Page 18]RFC 2259 SNQP January 1998 Responses are returned in blocks as they arrive from data repositories. Reply 351 begins a response block. Response blocks are terminated with periods. Tuples are sent within the block as a list of attribute name and value pairs: --------------------------------------------------------------------- <attribute-name>: <attribute-value> : <attribute-value> --------------------------------------------------------------------- Only the first line of a multi-line attribute returns the <attribute-name>. Successive tuples are separated with blank lines. Attributes with null or blank values are suppressed at the option of the SNQP server. In between response blocks, error replies can be reported. Replies 653, 660 and 761 are examples of such errors. Reply 653 reports a communication error with the data repository identified by the source location and described by the associated string. Reply 660 reports an error returned by a data repository. Reply 761 reports a known requirement of the data repository that the query failed to satisfy. Reply 761 reflects comparison of the query with known characteristics of the data repository by the SNQP server. For example, some data repositories refuse queries that do not contain a specific subset of attributes in the relation. Other replies are possible. It is best to check the the type and severity of the reply against the theory of reply codes in Section 4. When an SQL query in a block is successfully completed, the SNQP server sends Reply 352 to indicate that the next query is being started. Reply 352 reports the t-bound of the previous query if it is available. Reply 352 is sent even if the previous query terminated due to permanent errors. The one exception is that permanent errors generated by the next or stop command supersede Reply 352. When all SQL queries are complete, the SNQP server sends Reply 250 to indicate that all queries have been processed. A query block containing one query that has no responses will only return Reply 250. Reply 250 reports the t-bound of the last SQL query in the block if it is available. Reply 250 is sent even if the last query in the block terminated due to permanent errors. The one exception is that permanent errors generated by the stop command supersede Reply 352.Elliott & Ordille Informational [Page 19]RFC 2259 SNQP January 1998 Note that this command follows the convention that "intermediate" reply codes, as defined in Section 4, are used until the SQL query is complete. Final query completion error codes abort the processing of the SQL query. Examples of these errors include parsing errors (Reply 700) and semantic errors (Reply 750) in the SQL query. The SNQP server will attempt to continue with the next query if possible. The block of queries will be terminated with Reply 250 or 251 (from the stop command) to indicate that another query will be accepted. Indicating the t-bound of a query response is optional for SNQP servers. --------------------------------------------------------------------- 354-The query will contact <n> data repositories, ended with . <location> <location-description> 355-There are <n> attributes that may constrain the query, ended with . <attribute-name> 356-There are <n> possible values for "<attribute>", ended with . <attribute-value> 357-There are <n> constraining values for "<attribute>", ended with . 357-<attribute-value> 357 <attribute-value> 352 Beginning next query. Previous query current through <TIME>. 250 All queries processed. Current through <TIME>. 700 <SQL query parsing error> 750 <SQL query semantic error> --------------------------------------------------------------------- Different kinds of advice are returned in different blocks. Basic advice about the number, n, of data repositories that will be searched is returned with Reply 354. Subsequent lines list location and location description for the data repositories that will be searched. The data repository locations can be supplied to the SNQP server using the "source" attribute. Each location is followed by a blank and a descriptive phrase for the data repository. Basic advice about the attributes that may constrain the query is returned with reply code 355. The first line of the reply includes the number, n, of attributes. Subsequent lines list the names of the attributes. The specific values of the attribute will determine whether the query is constrained further.Elliott & Ordille Informational [Page 20]RFC 2259 SNQP January 1998 Advice for a particular attribute has two forms. First, the advice may list the n possible values for the attribute in reply 356. The list is complete; no other values for the attribute exist within the context of the query. Second, the advice may list the n values for the attribute that are known to constrain the query. The list is incomplete; other values of the attribute may exist within the context of the query. When advice for an SQL query in a block is successfully completed, the SNQP server sends reply 352 to indicate that the next query is being started. Reply 352 reports the t-bound of the advice for the previous query if it is available. Reply 352 is sent even if the previous query terminated due to permanent errors. The one exception is that permanent errors generated by the next or stop command supersede Reply 352. When all SQL queries are complete, the SNQP server sends Reply 250 to indicate that all queries have been processed. Reply 250 reports the t-bound of the last SQL query in the block if it is available. Reply 250 is sent even if the last query in the block terminated due to permanent errors. The one exception is that permanent errors generated by the stop command supersede Reply 352. Final query completion error codes abort the processing of the SQL query. Examples of these errors include parsing errors and semantic errors in the SQL query. The SNQP server will attempt to continue with the next query if possible. The block of queries will be terminated with Reply 250 or 251 (from the stop command) to indicate that another query will be accepted. Indicating the t-bound of advice is optional for SNQP servers.3.10 Relations --------------------------------------------------------------------- RELATIONS <TIME> 211-There are <n> relations defined: 211-<Relation-name> 211-<Relation-name> 211 Current through <TIME>. 556 T-bounds not supported --------------------------------------------------------------------- The relations command lists the currently available relation names. Since characteristics of relations can be cached, the user may ask for an answer that is more recent than <TIME>. The SNQP server willElliott & Ordille Informational [Page 21]RFC 2259 SNQP January 1998 endeavor to provide this information. The first line of the reply notes the number of relations <n>. Subsequent lines list the relation names. The information in the response is current through the time returned, but may have changed after that time. Accepting requests to improve a t-bound and indicating the t-bound of the result are optional for SNQP servers. If <TIME> is submitted when t-bounds are not supported, an error is returned.3.11 Stop --------------------------------------------------------------------- STOP 251 All pending queries and responses discarded 450 No query in progress --------------------------------------------------------------------- The stop command ends processing of the current SQL query, and cancels any that may have followed it in the last query command. An error is returned if no queries are in progress.3.12 Quit --------------------------------------------------------------------- QUIT 221 <domain-name> closing transmission channel --------------------------------------------------------------------- The quit command ends the session. It closes the TCP connection after signing off with the domain name of the SNQP server.4. Replies Most SNQP replies are short. They have a rely code followed by a continuation character and reply text. If the continuation character is blank, the reply is complete. If the continuation character is a dash ("-"), the reply continues on the next line. Text within the reply can vary, but the reply code remains the same. A two line reply example is given below:Elliott & Ordille Informational [Page 22]RFC 2259 SNQP January 1998 --------------------------------------------------------------------- nnn-Message1 nnn Message2 --------------------------------------------------------------------- In some cases commands or replies may be long, so these commands/replies use the '.'-terminated block structure that is used for message bodies in SMTP. Blocks are comprised of lines of text that constitute the command/reply. Blocks are terminated with a period on a line by itself. The theory of reply codes explained for SMTP in RFC-821 is used here. Table 2 defines the reply code structure. Reply codes are three digits, xyz. The x digit indicates the command status. The y digit indicates the component of the system that generated the reply. The z digit allows for further distinctions within replies from the same component. --------------------------------------------------------------------- Code Interpretation --------------------------------------------------------------------- 1yz Positive preliminary reply (not used in SNQP)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?