SerialPort.WaitNamedPipe
------------------------

Waits for a named pipe.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [SerialPort](component_SerialPort.md) | [13.4](newinversion134.md) | ❌ No | ✅ Yes | ❌ No | ✅ Yes, on Windows | ❌ No |

MBS( "SerialPort.WaitNamedPipe"; NamedPipeName { ; TimeOut } ) 

**MBS**( **"SerialPort.WaitNamedPipe";** /\* Waits for a named pipe. \*/  
**$NamedPipeName**; /\* The name of the named pipe. The string must include the name of the computer on which the server process is executing. A period may be used for the servername if the pipe is local.e.g. "\\\\servername\\pipe\\pipename" \*/   
**$TimeOut**) /\* Optional; The number of milliseconds that the function will wait for an instance of the named pipe to be available.  
We limit this from 0 to 5000. Default is 100ms.e.g. 100 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| NamedPipeName | The name of the named pipe. The string must include the name of the computer on which the server process is executing. A period may be used for the servername if the pipe is local. | "\\\\servername\\pipe\\pipename" |  |
| TimeOut | The number of milliseconds that the function will wait for an instance of the named pipe to be available.   We limit this from 0 to 5000. Default is 100ms. | 100 | Optional |

### Result

Returns OK or error.

### Description

Waits for a named pipe.  
Waits until either a time-out interval elapses or an instance of the specified named pipe is available for connection (that is, the pipe's server process has a pending ConnectNamedPipe operation on the pipe).  
Returns OK if pipe is available or returns an error.  
### Examples

Try it:

 MBS ("SerialPort.WaitNamedPipe"; "\\\\\\\\.\\\\pipe\\\\test"; 100)  
// all backslashes doubled so FileMaker passes them  
### Release notes

- **Version 13.4**
    - Added [SerialPort.WaitNamedPipe](https://www.mbsplugins.eu/SerialPortWaitNamedPipe.shtml) function to wait for a pipe and use with [SerialPort.OpenPath](https://www.mbsplugins.eu/SerialPortOpenPath.shtml) on Windows.

### Blog Entries

- [News in MBS FileMaker Plugin 13.4](https://www.mbsplugins.de/archive/2023-09-20/News_in_MBS_FileMaker_Plugin_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 13.4pr7](https://www.mbsplugins.de/archive/2023-09-07/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 4th September 2023 , last changed 4th September 2023

  
[SerialPort.Suspend](SerialPortSuspend.md) - [SerialPort.Write](SerialPortWrite.md)

[HTML Version](SerialPortWaitNamedPipe.shtml)