Skip to content

Commit 62fa8d5

Browse files
authored
Merge pull request #3407 from victormlg/isconnectable-documentation
Added documentation for isconnectable function
2 parents 3b914e9 + 45b7dbf commit 62fa8d5

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
layout: default
3+
title: isconnectable
4+
published: true
5+
---
6+
7+
[%CFEngine_function_prototype(hostname, port, timeout)%]
8+
9+
**Description:** Checks whether a port is connectable
10+
11+
[%CFEngine_function_attributes(hostname, port, timeout)%]
12+
13+
This function checks whether a `hostname`:`port` is connectable within `timeout` in seconds, before it times out. If `timeout` is 0, the connection blocks forever. `timeout` defaults to 30 s.
14+
15+
**Example:**
16+
17+
[%CFEngine_include_snippet(isconnectable.cf, #\+begin_src cfengine3, .*end_src)%]
18+
19+
Output:
20+
21+
[%CFEngine_include_snippet(isconnectable.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
22+
23+
**History:**
24+
25+
* Introduced in 3.26.0

0 commit comments

Comments
 (0)