您的位置:首页 > 其它

浅谈接口的封装和设计思想入门

2017-03-21 21:17 405 查看

如下是我学习C+的笔记(关于接口的封装和设计思想入门)   

只做了小小的总结。  

第一套api函数

#ifdefine _CLT_SOCKET_H__

#define _CLT_SOCKET_H__

//客户端初始化环境

int cltSocket_init(void **handle);

//客户端发报文

int cltSocket_senddata(void *handle,unsigned char *buf,int buflen);

//客户端收报文

int cltSocket_resvdata(void*handle,unsigned char *buf,int *buflen);

//客户端销毁报文

int cltSocket_destory(void *handle);

#endif

第二套api函数

#ifndef _CLT_SOCKET_H__

#define _CLT_SOCKET_H__

//客户端初始化环境

int cltSocket_init2(void **handle);

//客户端发报文

int cltSocket_senddata2(void *handle,unsigned char *buf,int buflen);

//客户端收报文

int cltSocket_resvdata2(void*hanle,unsigned char **buf,int *buflen);

int cltSocket_resvdata_Free2(unsigned char *buf);

//客户端销毁报文

int cltSocket_destory2(void *handle);

#endif
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐