Difference between revisions of "Component: Network Communications (Comms: Networking)"
From Flowcode Help
Jump to navigationJump to search| Line 48: | Line 48: | ||
''<span style="color:red;">No additional examples</span>''  | ''<span style="color:red;">No additional examples</span>''  | ||
| + | |||
| + | |||
| Line 53: | Line 55: | ||
==Macro reference==  | ==Macro reference==  | ||
| + | ===Connect===  | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | ||
|-  | |-  | ||
| Line 76: | Line 79: | ||
| + | ===Receive===  | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | ||
|-  | |-  | ||
| Line 104: | Line 108: | ||
| + | ===Send===  | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | ||
|-  | |-  | ||
| Line 127: | Line 132: | ||
| + | ===Listen===  | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | ||
|-  | |-  | ||
| Line 145: | Line 151: | ||
| + | ===SocketOpen===  | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | ||
|-  | |-  | ||
| Line 158: | Line 165: | ||
| + | ===SocketClose===  | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | ||
|-  | |-  | ||
| Line 171: | Line 179: | ||
| + | ===AcceptOpen===  | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | ||
|-  | |-  | ||
| Line 184: | Line 193: | ||
| + | ===AcceptClose===  | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | ||
|-  | |-  | ||
| Line 197: | Line 207: | ||
| + | ===Initialise===  | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | ||
|-  | |-  | ||
Revision as of 11:51, 3 February 2023
| Author | Matrix TSL | 
| Version | 1.5 | 
| Category | Comms: Networking | 
Contents
Network Communications component
A component designed to simplify the process of TCP/IP communications. Compatible with most of the Flowcode supported TCP/IP and WIFI components. A useful building block for creating components such as IoT and Modbus TCP.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_NetworkComms.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_NetworkComms.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
Connect
Receive
Send
Listen
| Listen | |
| Bind the socket to a port on the local host and set to listen mode. First Open a Socket on the local host Returns: 0=Fail, 1=OK | |
| Port | |
| Port number to listen on. | |
| Return | |
SocketOpen
| SocketOpen | |
| Attempts to create a socket on the local device. This must be succesful to allow TCP/IP communications with a remote destination. Returns: 0=Fail / 1=OK | |
| Return | |
SocketClose
| SocketClose | |
| Closes the current socket connection | |
| Return | |
AcceptOpen
| AcceptOpen | |
| Required for systems where there can be multiple incoming threads Returns 1 if there is incoming comms requiring a new thread, else returns 0 | |
| Return | |
AcceptClose
| AcceptClose | |
| Goes with the AcceptOpen function to close the new thread handle. | |
| Return | |
Initialise
| Initialise | |
| Initialises the network communications component. | |
| Return | |