1 Star 0 Fork 68

leavegee / cocosocket

forked from beykery / cocosocket 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Frame.h 672 Bytes
一键复制 编辑 原始数据 按行查看 历史
beykery 提交于 2014-03-03 16:58 . 修改utf8的内容
/*
* File: Frame.h
* Author: beykery
*
* Created on 2014年1月7日, 上午9:54
*/
#ifndef FRAME_H
#define FRAME_H
#include "ByteBuf.h"
class Frame {
public:
Frame(int len);
virtual ~Frame();
ByteBuf* GetData();
const Frame* PutByte(char c);
const Frame* PutBytes(ByteBuf* src);
const Frame* PutShort(short s);
const Frame* PutInt(int s);
const Frame* PutLong(long s);
const Frame* PutFloat(float s);
const Frame* PutString(char* s);
void End();
bool IsEnd();
void SetEnd(bool e);
const Frame* Duplicate();
private:
ByteBuf* payload; //原始数据
bool e; //是否封包
};
#endif /* FRAME_H */
1
https://gitee.com/leavegee/cocosocket.git
git@gitee.com:leavegee/cocosocket.git
leavegee
cocosocket
cocosocket
master

搜索帮助