sprequest.cpp
来自「spserver 是一个实现了半同步/半异步(Half-Sync/Half-As」· C++ 代码 · 共 45 行
CPP
45 行
/* * Copyright 2007 Stephen Liu * For license terms, see the file COPYING along with this library. */#include <string.h>#include <stdio.h>#include "sprequest.hpp"#include "spmsgdecoder.hpp"SP_Request :: SP_Request(){ memset( mClientIP, 0, sizeof( mClientIP ) ); mDecoder = new SP_DefaultMsgDecoder();}SP_Request :: ~SP_Request(){ if( NULL != mDecoder ) delete mDecoder; mDecoder = NULL;}SP_MsgDecoder * SP_Request :: getMsgDecoder(){ return mDecoder;}void SP_Request :: setMsgDecoder( SP_MsgDecoder * decoder ){ if( NULL != mDecoder ) delete mDecoder; mDecoder = decoder;}void SP_Request :: setClientIP( const char * clientIP ){ snprintf( mClientIP, sizeof( mClientIP ), "%s", clientIP );}const char * SP_Request :: getClientIP(){ return mClientIP;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?