`

change buffer size in order to send chunks data in ampoule

 
阅读更多

ampoule use name pipe to communicate among processes. There is a limit about 4096 bytes

 

on windows. We can't send any data which has a length over 4000. hacking the twisted codes can solve this problem.

 

1: open twisted/internet/_pollingfile.py

 

search  FULL_BUFFER_SIZE.. the default value is 4096..change it to a bigger one...like 64*1024.

 

save it

 

2: open twisted/internet/_dumbwin32proc.py

 

move the cursor to line: 136..we can find some assignments like:

 

 

self.hStdoutR, hStdoutW = win32pipe.CreatePipe(sAttrs, 0)

self.hStderrR, hStderrW = win32pipe.CreatePipe(sAttrs, 0)

hStdinR,  self.hStdinW  = win32pipe.CreatePipe(sAttrs, 0)

 

replace them by:

 

 

self.hStdoutR, hStdoutW = win32pipe.CreatePipe(sAttrs, _pollingfile.FULL_BUFFER_SIZE)

self.hStderrR, hStderrW = win32pipe.CreatePipe(sAttrs, _pollingfile.FULL_BUFFER_SIZE)

hStdinR,  self.hStdinW  = win32pipe.CreatePipe(sAttrs, _pollingfile.FULL_BUFFER_SIZE)

 

save the file...all done

 

now...ampoule can send some 60K chunks.

 

 

分享到:
评论

相关推荐

    计算机网络第六版答案

    Hence, it becomes possible for the attacker to issue a command to all the nodes, that target a single node (for example, all nodes in the botnet might be commanded by the attacker to send a TCP SYN ...

    Office 2019 in easy steps

    Task orientated, and in bite-size chunks, it shows how to: Create reports, newspapers, cards and booklets Calculate and manage your financial matters Perfect your presentations and slide shows Email...

    Read TDMS Channel Data in Chunks_tdms查看_

    设定固定范围的数据大小,采用TDMS查看部分数据

    yaffs2源码文件

    stored in 'chunks'. Chunks are the same size as NAND pages. Each page is marked with file id and chunk number. These marking 'tags' are stored in the OOB (or 'spare') region of the flash. The chunk ...

    Sakemail

    Dmitry Bondarenko say that some servers do not send the msg size after the RETR command, so he fix that issuing a LIST n command first (work nicely).- Added the property CC (Carbon Copy) to the ...

    Python by Example Learning to Program in 150 Challenges.pdf

    This engaging and refreshingly different guide breaks down the skills into clear step-by-step chunks and explains the theory using brief easy-to-understand language. Rather than bamboozling readers ...

    Python for Data Analysis 第二版

    This book is here to help you get your job done. In general, you may use the code in this book in your programs and documentation. You do not need to contact us for permission unless you’re ...

    php.ini-development

    will send that data in chunks of roughly the size you specify. ; Turning on this setting and managing its maximum buffer size can yield some ; interesting side-effects depending on your application ...

    buffer-chunks:将缓冲区拆分为一个块

    缓冲块 将缓冲区拆分为块 安装 npm install buffer-chunks ... var list = chunks ( new Buffer ( 'aaaaazzzzzbbbbb' ) , 5 ) ; // -> [ < Buffer> , < Buffer> , < Buffer> ] 执照 麻省理工学院

    Introduction to Computational molecular biology - Carlos Setubal, Joao Meidanis

    It has been discovered that some organisms are genetically different, not so much at the sequence level, but in the order in which large similar chunks of their DNA appear in their respective ...

    傳輸大檔案 Sending Files in Chunks with MTOM Web Services and .NET 2.0

    傳輸大檔案 Sending Files in Chunks with MTOM Web Services and .NET 2.0

    Senfore_DragDrop_v4.1

    If you feel you need to send me a screen shot, please send it in GIF or PNG format. If you mail a bug report to me, please include the words "Drag Drop" in the subject of your email. --------------...

    文件内容读入chunks

    文件内容读入chunks比较简单的方法是一个一个字符读取但速度很慢

    Pro Apache Hadoop(Apress,2ed,2014)

    data problems the MapReduce way, by breaking a big problem into chunks and creating small-scale solutions that can be flung across thousands upon thousands of nodes to analyze large data volumes in a ...

    DIZipWriter v6.2.0 for D7-XE10.1 ZIP 压缩 解压缩

    As data flows in (for example from a slow download), they can write it in small chunks at a time. DIZipWriter outputs all data to the archive straight away, with no need for temporary storage: It ...

    Python Text Processing with NLTK 2.0 Cookbook.pdf

    Learn how to easily handle huge amounts of data without any loss in efficiency or speed. This book will teach you all that and beyond, in a hands-on learn-by-doing manner. Make yourself an expert ...

    buffer-file-stream:将每个缓冲区块写入具有递增文件名的单个文件

    // writes all Buffer 'data' chunks to blah-000.txt, blah-001.txt, etc // uses sprintf syntax for pattern var bfs = bufferFileStream ( '/tmp/blah-d.txt' ) ; bfs . write ( 'hello' ) ; // creates a text ...

    Defensive.Security.Handbook.2017.4.pdf

    Despite the increase of high-profile hacks, record-breaking data leaks, and ransomware attacks, many organizations don’t have the budget to establish or outsource an information security (InfoSec) ...

    png-chunks-extract:从PNG文件中提取数据块

    用法chunks = extract(data) 将原始图像文件data作为Uint8Array或Node.js Buffer ,并返回一个大块数组。 每个块都有一个名称和数据缓冲区: [ { name : 'IHDR' , data : Uint8Array ( [ ... ] ) } , { name : 'IDAT...

    Aria2135032bit.7z

    aria2 requests chunks more than piece size to reduce the request overhead. It also supports pipelined requests with piece size. BitTorrent Local Peer Discovery Rename/change the directory structure...

Global site tag (gtag.js) - Google Analytics