亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? buffer.hpp

?? 一個不錯的關(guān)于手機(jī)模塊程序This page contains everything that has changed in the history of DC++. Read this to fin
?? HPP
字號:
/* buffer.hpp                                
 *
 * Copyright (C) 2003 Sawtooth Consulting Ltd.
 *
 * This file is part of yaSSL.
 *
 * yaSSL is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * yaSSL is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
 */


/* yaSSL buffer header defines input and output buffers to simulate streaming
 * with SSL types and sockets
 */

#ifndef yaSSL_BUFFER_HPP
#define yaSSL_BUFFER_HPP

#include <assert.h>             // assert
#include "yassl_types.hpp"      // ysDelete
#include "memory.hpp"           // mySTL::auto_ptr
#include "algorithm.hpp"        // mySTL::swap


#ifdef _MSC_VER
    // disable truncated debug symbols
    #pragma warning(disable:4786)
#endif


namespace yaSSL {

typedef unsigned char byte;
typedef unsigned int  uint;
const uint AUTO = 0xFEEDBEEF;


// Checking Policy should implement a check function that tests whether the
// index is within the size limit of the array
struct Check {
    void check(uint i, uint limit);
};


struct NoCheck {
    void check(uint, uint);
};

/* input_buffer operates like a smart c style array with a checking option, 
 * meant to be read from through [] with AUTO index or read().
 * Should only write to at/near construction with assign() or raw (e.g., recv)
 * followed by add_size with the number of elements added by raw write.
 *
 * Not using vector because need checked []access, offset, and the ability to
 * write to the buffer bulk wise and have the correct size
 */

class input_buffer : public Check {
    uint   size_;                // number of elements in buffer
    uint   current_;             // current offset position in buffer
    byte*  buffer_;              // storage for buffer
    byte*  end_;                 // end of storage marker
public:
    input_buffer();

    explicit input_buffer(uint s);
                          
    // with assign
    input_buffer(uint s, const byte* t, uint len);
    
    ~input_buffer();

    // users can pass defualt zero length buffer and then allocate
    void allocate(uint s);

    // for passing to raw writing functions at beginning, then use add_size
    byte* get_buffer() const;

    // after a raw write user can set new size
    // if you know the size before the write use assign()
    void add_size(uint i);

    uint get_capacity()  const;

    uint get_current()   const;

    uint get_size()      const;

    uint get_remaining() const;

    void set_current(uint i);

    // read only access through [], advance current
    // user passes in AUTO index for ease of use
    const byte& operator[](uint i);
    
    // end of input test
    bool eof();

    // peek ahead
    byte peek() const;

    // write function, should use at/near construction
    void assign(const byte* t, uint s);
    
    // use read to query input, adjusts current
    void read(byte* dst, uint length);

private:
    input_buffer(const input_buffer&);              // hide copy
    input_buffer& operator=(const input_buffer&);   // and assign
};


/* output_buffer operates like a smart c style array with a checking option.
 * Meant to be written to through [] with AUTO index or write().
 * Size (current) counter increases when written to. Can be constructed with 
 * zero length buffer but be sure to allocate before first use. 
 * Don't use add write for a couple bytes, use [] instead, way less overhead.
 * 
 * Not using vector because need checked []access and the ability to
 * write to the buffer bulk wise and retain correct size
 */
class output_buffer : public Check {
    uint    current_;                // current offset and elements in buffer
    byte*   buffer_;                 // storage for buffer
    byte*   end_;                    // end of storage marker
public:
    // default
    output_buffer();

    // with allocate
    explicit output_buffer(uint s);

    // with assign
    output_buffer(uint s, const byte* t, uint len);

    ~output_buffer();

    uint get_size() const;

    uint get_capacity() const;

    void set_current(uint c);

    // users can pass defualt zero length buffer and then allocate
    void allocate(uint s);

    // for passing to reading functions when finished
    const byte* get_buffer() const;

    // allow write access through [], update current
    // user passes in AUTO as index for ease of use
    byte& operator[](uint i);
    
    // end of output test
    bool eof();

    void write(const byte* t, uint s);

private:
    output_buffer(const output_buffer&);              // hide copy
    output_buffer& operator=(const output_buffer&);   // and assign
};




// turn delete an incomplete type into comipler error instead of warning
template <typename T>
inline void checked_delete(T* p)
{
    typedef char complete_type[sizeof(T) ? 1 : -1];
    (void)sizeof(complete_type);
    ysDelete(p);
}


// checked delete functor increases effeciency, no indirection on function call
// sets pointer to zero so safe for std conatiners
struct del_ptr_zero
{
    template <typename T>
    void operator()(T*& p) const
    {
        T* tmp = 0;
        mySTL::swap(tmp, p);
        checked_delete(tmp); 
    }
};



} // naemspace

#endif // yaSSL_BUUFER_HPP

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美久久婷婷综合色| 成人免费视频一区| 欧美男男青年gay1069videost | 亚洲午夜电影网| 欧美日韩国产综合草草| 日本三级韩国三级欧美三级| 91精品午夜视频| 激情欧美日韩一区二区| 国产亚洲美州欧州综合国| av一二三不卡影片| 亚洲欧美电影一区二区| 91精品国产91久久久久久一区二区 | 国产一区二区三区免费| 国产精品嫩草久久久久| 91在线你懂得| 蜜臀av性久久久久av蜜臀妖精| 国产亚洲短视频| 色香蕉成人二区免费| 免费视频最近日韩| 国产精品每日更新| 欧美美女视频在线观看| 国产在线一区观看| 一区二区三区在线视频免费| 欧美剧在线免费观看网站 | 色哟哟日韩精品| 麻豆成人免费电影| 亚洲久本草在线中文字幕| 日韩三级伦理片妻子的秘密按摩| 国产成a人无v码亚洲福利| 一区av在线播放| 久久综合网色—综合色88| 色综合天天综合在线视频| 蜜桃一区二区三区四区| 亚洲精品国久久99热| 欧美精品一区二区不卡| 91论坛在线播放| 国产在线视视频有精品| 亚洲五月六月丁香激情| 国产精品女主播av| 精品国产一区二区在线观看| 在线免费观看成人短视频| 精品一区二区在线播放| 亚洲成人综合在线| 国产精品久久久久一区二区三区 | 成人永久aaa| 婷婷综合另类小说色区| 亚洲日本在线a| 久久久精品国产免费观看同学| 欧美日本不卡视频| 色av一区二区| 99热精品一区二区| 国产成人综合在线播放| 麻豆91在线播放| 五月天网站亚洲| 一二三四社区欧美黄| 国产精品免费人成网站| 久久久影院官网| 精品国产一区二区亚洲人成毛片| 欧美男男青年gay1069videost| 波多野结衣在线一区| 国产精品自拍网站| 精彩视频一区二区三区| 老司机午夜精品99久久| 日本强好片久久久久久aaa| 亚洲午夜精品网| 亚洲国产成人va在线观看天堂| 亚洲人成人一区二区在线观看 | 婷婷丁香久久五月婷婷| 亚洲国产一二三| 亚洲在线视频网站| 一区二区视频免费在线观看| 亚洲欧美日本韩国| 亚洲卡通动漫在线| 亚洲综合久久久| 亚洲专区一二三| 天天影视网天天综合色在线播放| 亚洲影视资源网| 亚洲成人黄色影院| 婷婷成人激情在线网| 蜜桃av一区二区在线观看 | 午夜精品福利一区二区三区av| 亚洲一区二三区| 性做久久久久久久久| 日本中文字幕一区二区视频| 日本不卡视频在线| 国产一区二区三区日韩| 成人在线综合网| 在线亚洲免费视频| 欧美精品一卡二卡| 亚洲精品在线观| 中文av一区二区| 亚洲精品视频一区| 日韩一区精品视频| 日本中文一区二区三区| 国产综合色在线视频区| 成人精品亚洲人成在线| 99vv1com这只有精品| 欧美午夜精品久久久久久超碰| 欧美一区二区三区在线电影| 精品成人佐山爱一区二区| 日韩美女视频一区二区| 亚洲无线码一区二区三区| 美日韩黄色大片| 成人av免费在线播放| 欧美丝袜自拍制服另类| 久久久精品欧美丰满| 樱花草国产18久久久久| 美女国产一区二区| 成人app在线| 欧美在线观看视频一区二区三区| 欧美一区二区三区色| 欧美激情在线一区二区三区| 亚洲国产精品久久艾草纯爱| 久久99精品视频| 91麻豆成人久久精品二区三区| 日韩一区国产二区欧美三区| 国产精品久久免费看| 日韩电影在线一区二区| 91网站最新地址| 精品理论电影在线观看| 亚洲免费av网站| 国产精品一区一区| 在线播放中文一区| 国产精品视频麻豆| 久久成人羞羞网站| 欧美挠脚心视频网站| 国产精品成人网| 久久99国产精品成人| 91福利在线看| 国产精品高潮呻吟久久| 秋霞电影网一区二区| 色婷婷综合视频在线观看| 久久久蜜桃精品| 日日摸夜夜添夜夜添国产精品| 成人伦理片在线| 26uuu另类欧美| 肉肉av福利一精品导航| 色狠狠一区二区| 欧美国产一区在线| 久久狠狠亚洲综合| 欧美精选一区二区| 亚洲综合一区二区| 99v久久综合狠狠综合久久| 国产日韩欧美精品综合| 国内成+人亚洲+欧美+综合在线| 欧美三级三级三级| 一区二区三区中文在线| 99久久久无码国产精品| 中文字幕免费不卡| 国产一区激情在线| 精品欧美久久久| 日韩av一二三| 欧美一级夜夜爽| 蜜芽一区二区三区| 欧美一区二区三区免费在线看| 亚洲精品久久嫩草网站秘色| jiyouzz国产精品久久| 国产婷婷一区二区| 国产精品18久久久久久久久久久久| 欧美一级二级三级乱码| 老司机精品视频线观看86| 69p69国产精品| 日本成人在线电影网| 欧美一级免费观看| 捆绑调教一区二区三区| 日韩精品一区二区三区在线观看| 免费高清在线视频一区·| 日韩亚洲欧美成人一区| 免费成人在线观看| 日韩欧美激情在线| 国产麻豆成人精品| 国产精品视频观看| 91视视频在线观看入口直接观看www| 国产精品嫩草久久久久| 99精品1区2区| 亚洲成人激情av| 日韩欧美综合在线| 久久国内精品视频| 国产精品视频你懂的| 91精品1区2区| 热久久国产精品| 国产亚洲午夜高清国产拍精品 | 国产精品主播直播| 1区2区3区精品视频| 在线一区二区视频| 日本在线不卡一区| 久久婷婷国产综合精品青草| 成人免费黄色在线| 亚洲黄网站在线观看| 日韩视频一区二区三区在线播放| 国产一区二区91| 亚洲精品福利视频网站| 欧美精品v国产精品v日韩精品 | www.成人网.com| 一卡二卡欧美日韩| 精品久久久久久久一区二区蜜臀| 风间由美性色一区二区三区| 一区二区三区国产| 久久天天做天天爱综合色| 91免费国产在线|