Component for handling pipes will let your independent programs exchange data directly in RAM without writing it on a disk. Now creating a pipe is as easy as in Linux, Unix or Mac – just one row of code is enough. For reference, in Windows one should write many rows of code to connect a pipe. Moreover, win32api needs to define master/slave relations, making it inconvenient to use. PBPipes doesn’t need it.
Prerequirements
OS compatibility
7 SP2 x64 |
8 x64 |
8.1 x64 |
10 x64 |
11 x64 |
RAD Studio compatibility
10 Seattle |
10.1 Berlin |
10.2 Tokyo |
10.3 Rio |
10.4 Sydney |
11 Alexandria |
1 user
3 users
5 users
10 users
Site license
Free components in a bundle
Buy a bundle now and enjoy all new component releases for free during the update period. |
Keep track of multiple versions
You will get access to all older versions and a detailed changelog. |
Free new features
Get all new component features for free during the free update period. |
Install once use forever
Our products are not time limited. |
Source code promise
In case our component will become obsolete and we no longer support it, we will provide you its source code. So you don’t have to worry about a replacement. |
References:
> QSG code example provided with the installer
After installation, a group PyBridge will appear in the Tool Palette of Delphi, where you can find the new component TPBPipes.
New component TPBPipes can be found in the Tool Palette under PyBridge group
Place TPBPipes onto the form and set up its main properties:
- ClientName – the unique name of the client to connect to the Pipe. It is randomly generated by default.
- PipeName – the name of the Pipe.
- ServerName – the name of the server where Pipe is located. The server name equal to “.” means that the server is on the same computer as the client. In Win32, the Pipe API should look like: ‘\\.\PIPE\’ to connect to the local server or ‘\\\PIPE\’ to connect to the remote server.
Now PBPipes is ready to be used. To demonstrate how it works, let’s create a very simple chat application for any number of participants.
Add following elements to the form:
- “Send” button with an input field for sending messages
- Memo for displaying messages
Chat application layout based on PBPipes
Generate a random client name and open a Pipe during the creation of the form.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
procedure TPipesDemo.FormCreate(Sender: TObject); begin PBPipes1.ClientName := rnd; PipesDemo.Caption := PBPipes1.ClientName; PBPipes1.Open; end; function TPipesDemo.rnd : string; var i: integer; begin Result:='Client'; for i :=0 to 4 do Result:= Result+ IntToStr(RandomRange(0,9)); end; |
Create an OnMessage event handler for receiving messages and create handler of clicking the “Send” button for sending messages
1 2 3 4 5 6 7 8 9 |
procedure TPipesDemo.PBPipes1Message(const AClientName, AMessage: string); begin Memo1.Lines.Add(AClientName + ':' + #9 + AMessage); end; procedure TPipesDemo.SendButtonClick(Sender: TObject); begin PBPipes1.SendMessage(Edit1.Text); end; |
Now run several copies of the application at the same time. Each application will generate a random client name and open access to the same Pipe. The first application to open the Pipe becomes the Pipe server. All other applications become Pipe clients until the Pipe server disconnects from the Pipe.
Applications exchange messages through PBPipes
This example demonstrates how you can easily and quickly create a chat application for any number of participants with a help of PBPipes component. Now you can also enjoy the full power of PBPipes in your applications!