[fpc-pascal] Pipe vs Memory buffer.

fredvs fiens at hotmail.com
Thu Jan 26 13:38:19 CET 2017

> didn't understand the software structure / problem behind the C->
> Pascal translation

Huh, IMO, the translation is ok. 
The problem is that the method ask for a memory buffer and I give a pipe.

> but for me named pipes work very well for many kinds of interprocess
> communication.

Yes, for example, mpg123 library is very happy with this:

PipeBufferSize := $4000 ;

CreatePipeHandles(InHandle, OutHandle, PipeBufferSize);

InPipe := TInputPipeStream.Create(InHandle);
OutPipe := TOutputPipeStream.Create(OutHandle);
httpget := TThreadHttpGetter.Create(opus_url,OutPipe);

mpg123_open_handle(AHandle, Pointer(InPipe));

But for Opus library, there is error while using:

op_test_memory(pointer(InPipe),PipeBufferSize, Err);

Like Michael explained, the buffer of the pipe must be entered.

And I do not know how to do this... ;-(


Many thanks ;-)
View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Pipe-vs-Memory-buffer-tp5727435p5727446.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.

More information about the fpc-pascal mailing list