Location:
Search - buf
Search list
Description: 一个线程驰的类, 下面的是基本的使用方法 struct TSession { SOCKET socket int id } class myIocp:public CIOCP { public: void OnRead(void * p, char * buf, int len) void OnAccept(SOCKET socket) void OnClose(void * p) } void myIocp::OnAccept(SOCKET socket) { TSession *s = new TSession s->socket = socket //这里可以对连接的session进行自己的操作,例如给id找一个唯一的值 SetIoCompletionPort(socket, s) // 使连接socket与一个自定义结构体关联 } void myIocp::OnRead(void * p, char * buf, int len) { TSession *s = (TSession *)p send(s->socket, buf, len, 0) // 这里只是简单的把收到的消息返回给客户端 ... } void myIocp::OnClose(void * p) { delete p } myIoncp iocp main() { ... iocp.listen(4311) // 开始监听网络端口,等待客户端连接 ... }-A class for thread pool,basic usage below:
struct TSession { SOCKET socket int id } class myIocp:public CIOCP
{ public:
void OnRead(void * p, char * buf, int len)
void OnAccept(SOCKET socket)
void OnClose(void * p) }
void myIocp::OnAccept(SOCKET socket)
{ TSession *s = new TSession s->socket = socket
//here you can do something about connection session,such as find a unique id.
SetIoCompletionPort(socket, s)
// make connection socket associate with a custom structure }
void myIocp::OnRead(void * p, char * buf, int len)
{ TSession *s = (TSession *)p send(s->socket, buf, len, 0)
// return received message to client
void myIocp::OnClose(void * p) { delete p } myIoncp iocp main() { ... iocp.listen(4311)
//start listenning net port,wait for client connect.
Platform: |
Size: 2701 |
Author: boxu |
Hits:
Description: 在原始图像buf上画直线的算法,便于观察调试,无错误-the original image buf painted linear algorithms facilitate the observation of debugging, error-free
Platform: |
Size: 855 |
Author: 郭武 |
Hits:
Description: C++ Base64编码/解码源代码
inline int Base64Encode(char * base64code, const char * src, int src_len = 0)
inline int Base64Decode(char * buf, const char * base64code, int src_len = 0) 以上两个函数内联定义在base64.h中,使用时include \"base64.h\" 即可,编码后的长度一般比原文多占1/3的存储空间,为了效率,程序并没有检查目标存储区是否溢出,请保证有足够的存储空间。
-C Base64 encoding / decoding source code inline int Base64Encode (char * base64code, const char * src, int src_len = 0) inline int Base64Decode (char * buf, base64code const char *, int src_len = 0) over two letters few within the definition in conjunction base64.h, when used include "base64.h" can, coding the original length generally occupy more than 1 / 3 of storage space, in order to efficiency, procedures and did not check whether the target storage areas overflow, please ensure that there is sufficient storage space.
Platform: |
Size: 5583 |
Author: 王晓名 |
Hits:
Description: 其中的usb端口通信已经作为一个模块来使用,用户只需用以下函数就可以对usb端口进行方便的读写:
unsigned char D12_WriteEndpoint(unsigned char endp, unsigned char len, unsigned char * buf) 此为usb端点输出函数,endp是要进行通信的端点,取值为3(普通端点,最大可一次传输16byte)或5(主端点,最大可一次传输64byte);len为一次输出数据长度;*buf为数据所在位置。
usb端点数据的读操作是由底层函数自动完成的(相关函数为unsigned char D12_ReadEndpoint(unsigned char endp, unsigned char len, unsigned char * buf); 相应端点为2和4),所读到的数据存于GenEpBuf[](普通端点)、MainEpBuf[]或EpBuf[](主端点)中,用户可以直接读取使用。-the usb port which has a communications module to use, Users only need to use the following function, it can usb port for convenient reading and writing : unsigned char D12_WriteEndpoint (unsigned ch ar endp, unsigned char len. unsigned char * buf) usb endpoint of this output function, endp to the endpoint of communication, value for the three (general endpoint. a maximum transmission 16 byte), or 5 (the main endpoint, a maximum transmission 64byte); len output data for a length; * buf for data location. Usb endpoint data read operation from the bottom of the complete automatic function (correlation function for unsigned char D12_ReadEndpoint (unsigned char endp. unsigned char len, unsigned char * buf); corresponding endpoint of 2 and 4), which read data stored in GenEpBuf [] (General e
Platform: |
Size: 12683 |
Author: 刘军 |
Hits:
Description: FlashROM的存储控件操作源代码,用于在Ram中建立Flash映射Buf,减少直接操作Flash次数
Platform: |
Size: 3101 |
Author: XuJiaye |
Hits:
Description: 使用的gif89a类以及其他相关文件,并移植到WinCE平台上。
其中值得注意的主要是这个操作
code = *((DWORD*)(buf+bufIndex))
可以用乘法或者内存复制操作来代替
Platform: |
Size: 47218 |
Author: 何辉 |
Hits:
Description: 倍频详解,IBUFG,BUF,希望大家喜欢
Platform: |
Size: 452349 |
Author: 周辉 |
Hits:
Description: 一个完整的SHELL实现源代码,内容包括:buf.c def.h dir.c file.c fs.c fs.h dh.c inode.c main.c os.exe panic.c 对学习操作系统有很大的帮助
Platform: |
Size: 55340 |
Author: 鹳达 |
Hits:
Description: dnw的改进版本,增大缓冲区到了1M,使工具可以保留和显示串口发送的1M以内的数据。
Platform: |
Size: 39437 |
Author: ahak |
Hits:
Description: 模拟编译系统的内存分配与释放的,实现一些简单的操作。首先用一个静态数组模拟内存空间(buf),当调用申请内存操作时,将从数组空间(buf)返回给调用者一定的空间,当调用释放内存的时候,将将指定部分的内存标记为未用。
Platform: |
Size: 1760 |
Author: fy |
Hits:
Description: 源代码的思路参考自 Mark Nelson 所著的<<数据压缩技术原理与范例>>
中的第八章\"滑动窗口压缩\",是lz77算法的一种简介直观的实现,但是由于
没有采用如LZSS算法中的二叉搜索树技术,所以在运行速度上不如LZSS算法。
采用了微量缓冲区buf 以加快执行速度。
Platform: |
Size: 79917 |
Author: xxxxxiao |
Hits:
Description: 编写程序,以统计BUF数据区中各有符号字节数的平均值。上机调试程序,检查程序正确性。
Platform: |
Size: 499 |
Author: zxymo@yahoo.cn |
Hits:
Description: 这个程序是控制NRF24E1的跳频的测试程序,通过这个程序可以了解跳频的实现方法-this procedure is to control the frequency-hopping NRF24E1 testing procedures, this procedure can understand the method of frequency hopping
Platform: |
Size: 5120 |
Author: 屈力 |
Hits:
Description: 在原始图像buf上画直线的算法,便于观察调试,无错误-the original image buf painted linear algorithms facilitate the observation of debugging, error-free
Platform: |
Size: 1024 |
Author: 郭武 |
Hits:
Description: 倍频详解,IBUFG,BUF,希望大家喜欢-Detailed octave, IBUFG, BUF, hope you like
Platform: |
Size: 451584 |
Author: 周辉 |
Hits:
Description: 数据加密程序
p macro buf
lea dx,buf
mov ah,9
int 21h
endm
data segment
pp db 0dh,0ah, welcome you to run this programme!$
qq db 0dh,0ah, when you input number,press enter.$
qw db 0dh,0ah, 6eh,52h,94h,52h,$
qa db 0dh,0ah, $
info1 db 0dh,0ah,0dh, input number:$
info2 db 0dh,0ah, output number:$
bufa db 20
-Data encryption program p macro buflea dx, bufmov ah, 9int 21hendmdata segmentpp db 0dh, 0ah, welcome you to run this programme! $ Qq db 0dh, 0ah, when you input number, press enter. $ Qw db 0dh, 0ah, 6eh, 52h, 94h, 52h, $ qa db 0dh, 0ah, $ info1 db 0dh, 0ah, 0dh, input number: $ info2 db 0dh, 0ah, output number: $ bufa db 20
Platform: |
Size: 3072 |
Author: ty |
Hits:
Description: 用c++编写的网络通信框架,适用于多客户端的网络通信
client: 模拟客户端程序
server: 模拟服务端程序
gateway:网关程序
启动:client.exe server.exe gateway.exe程序,client程序会网关gateway.exe发送消息
消息内容为字符:00004XXXX XXXX为字符,是使用 04d打印到BUF中的,
gateway.exe收到client.exe发送的消息,此时从系统路由表中取到:B_HOST的信息,并把
收到的消息转发到server.exe程序,如果server.exe程序作相应处理,还可以作为应答,把
消息返回给client.exe,如果要这么实现的话,需要加流水信息-Using c++ to prepare the framework of network communication for multi-client network client: client simulation server: process simulation server gateway: Gateway proceedings: client.exe server.exe gateway.exe procedures, client program will be the gateway message send a message gateway.exe for characters: 00004XXXX XXXX for the characters, is to use 04d to BUF in print, gateway.exe received messages sent client.exe, this time from the system to check the routing table: B_HOST the information, and forwarded to the information received server.exe procedure, if the corresponding procedures to deal with server.exe, but also can serve as a response to the news back to the client.exe, so if true, the need for additional water information
Platform: |
Size: 25600 |
Author: carson |
Hits:
Description: 把一个8位二进制数的各位用ASCII码表示之(亦即为“0”的位用30H表示,为“1”的位用31H表示)。该数存放在内部RAM中byte单元中。变换后得到的8个ASCII码存放在外部RAM以buf始的存储单元中去。-To an 8-bit binary numbers that you use the ASCII code (which is " 0" bit with the 30H, said, " 1" bit said with 31H). The number stored in the internal RAM of byte unit. Transform ASCII code 8 by the external RAM to be stored in buf to the beginning of the storage unit.
Platform: |
Size: 2048 |
Author: 周洁路 |
Hits:
Description: buf.c: memory buffers for libxml2.
Platform: |
Size: 8192 |
Author: kunginjun |
Hits:
Description: this is buf for verilog
Platform: |
Size: 2048 |
Author: Hainder |
Hits: