Data Structures | Defines | Enumerations | Functions | Variables

SpdyCommon.h File Reference

SpdyCommon.h. More...

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <getopt.h>
#include <limits.h>
#include <string.h>
#include <string>
#include <vector>
#include <map>
#include "P_Net.h"
#include "ts/ts.h"
#include "ts/libts.h"
#include "ts/experimental.h"
#include <spdylay/spdylay.h>
Include dependency graph for SpdyCommon.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  SpdyNV

Defines

#define STATUS_200   "200 OK"
#define STATUS_304   "304 Not Modified"
#define STATUS_400   "400 Bad Request"
#define STATUS_404   "404 Not Found"
#define STATUS_405   "405 Method Not Allowed"
#define STATUS_500   "500 Internal Server Error"
#define DEFAULT_HTML   "index.html"
#define SPDYD_SERVER   "ATS Spdylay/" SPDYLAY_VERSION
#define atomic_fetch_and_add(a, b)   __sync_fetch_and_add(&a, b)
#define atomic_fetch_and_sub(a, b)   __sync_fetch_and_sub(&a, b)
#define atomic_inc(a)   atomic_fetch_and_add(a, 1)
#define atomic_dec(a)   atomic_fetch_and_sub(a, 1)
#define SPDY_INCREMENT_THREAD_DYN_STAT(_s, _t)   RecIncrRawStat(spdy_rsb, _t, (int) _s, 1);
#define SPDY_DECREMENT_THREAD_DYN_STAT(_s, _t)   RecIncrRawStat(spdy_rsb, _t, (int) _s, -1);
#define SPDY_SUM_THREAD_DYN_STAT(_s, _t, _v)   RecIncrRawStat(spdy_rsb, _t, (int) _s, _v);

Enumerations

enum  {
  SPDY_STAT_CURRENT_CLIENT_SESSION_COUNT, SPDY_STAT_CURRENT_CLIENT_STREAM_COUNT, SPDY_STAT_TOTAL_TRANSACTIONS_TIME, SPDY_STAT_TOTAL_CLIENT_CONNECTION_COUNT,
  SPDY_N_STATS
}

Functions

string http_date (time_t t)
int spdy_config_load ()

Variables

spdylay_session_callbacks spdy_callbacks
uint32_t spdy_max_concurrent_streams
uint32_t spdy_initial_window_size
int32_t spdy_accept_no_activity_timeout
int32_t spdy_no_activity_timeout_in
RecRawStatBlockspdy_rsb
 Container for statistics.

Detailed Description

SpdyCommon.h.

License

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file SpdyCommon.h.


Define Documentation

#define atomic_dec (   a  )     atomic_fetch_and_sub(a, 1)

Definition at line 56 of file SpdyCommon.h.

#define atomic_fetch_and_add (   a,
  b 
)    __sync_fetch_and_add(&a, b)

Definition at line 53 of file SpdyCommon.h.

#define atomic_fetch_and_sub (   a,
  b 
)    __sync_fetch_and_sub(&a, b)

Definition at line 54 of file SpdyCommon.h.

#define atomic_inc (   a  )     atomic_fetch_and_add(a, 1)

Definition at line 55 of file SpdyCommon.h.

Referenced by SpdyClientSession::init().

#define DEFAULT_HTML   "index.html"

Definition at line 50 of file SpdyCommon.h.

#define SPDY_DECREMENT_THREAD_DYN_STAT (   _s,
  _t 
)    RecIncrRawStat(spdy_rsb, _t, (int) _s, -1);

Definition at line 103 of file SpdyCommon.h.

Referenced by SpdyClientSession::clear(), and SpdyRequest::clear().

#define SPDY_INCREMENT_THREAD_DYN_STAT (   _s,
  _t 
)    RecIncrRawStat(spdy_rsb, _t, (int) _s, 1);

Definition at line 100 of file SpdyCommon.h.

Referenced by SpdyClientSession::init(), and SpdyRequest::init().

#define SPDY_SUM_THREAD_DYN_STAT (   _s,
  _t,
  _v 
)    RecIncrRawStat(spdy_rsb, _t, (int) _s, _v);

Definition at line 106 of file SpdyCommon.h.

Referenced by spdy_read_fetch_body_callback().

#define SPDYD_SERVER   "ATS Spdylay/" SPDYLAY_VERSION

Definition at line 51 of file SpdyCommon.h.

#define STATUS_200   "200 OK"

Definition at line 44 of file SpdyCommon.h.

#define STATUS_304   "304 Not Modified"

Definition at line 45 of file SpdyCommon.h.

#define STATUS_400   "400 Bad Request"

Definition at line 46 of file SpdyCommon.h.

Referenced by spdy_process_syn_stream_frame().

#define STATUS_404   "404 Not Found"

Definition at line 47 of file SpdyCommon.h.

#define STATUS_405   "405 Method Not Allowed"

Definition at line 48 of file SpdyCommon.h.

#define STATUS_500   "500 Internal Server Error"

Definition at line 49 of file SpdyCommon.h.

Referenced by spdy_process_fetch().


Enumeration Type Documentation

anonymous enum
Enumerator:
SPDY_STAT_CURRENT_CLIENT_SESSION_COUNT 

Current # of active SPDY sessions.

SPDY_STAT_CURRENT_CLIENT_STREAM_COUNT 

Current # of active SPDY streams.

SPDY_STAT_TOTAL_TRANSACTIONS_TIME 
SPDY_STAT_TOTAL_CLIENT_CONNECTION_COUNT 
SPDY_N_STATS 

Terminal counter, NOT A STAT INDEX.

Definition at line 70 of file SpdyCommon.h.


Function Documentation

string http_date ( time_t  t  ) 

Definition at line 46 of file SpdyCommon.cc.

Referenced by spdy_prepare_status_response_and_clean_request().

int spdy_config_load (  ) 

Variable Documentation

Definition at line 42 of file SpdyCommon.cc.

Referenced by SpdyClientSession::init(), and spdy_config_load().

spdylay_session_callbacks spdy_callbacks

Definition at line 28 of file SpdyCommon.cc.

Referenced by SpdyClientSession::init(), and spdy_config_load().

Definition at line 41 of file SpdyCommon.cc.

Referenced by spdy_config_load(), and spdy_on_data_recv_callback().

Definition at line 40 of file SpdyCommon.cc.

Referenced by spdy_config_load().

Definition at line 43 of file SpdyCommon.cc.

Referenced by spdy_config_load().

Container for statistics.

Definition at line 31 of file SpdyCommon.cc.