Net Endpoint
Net Endpoint is used to create and start network protocol services, supporting: tcp, udp, ip4:1, ip6:ipv6-icmp, ip6:58, unix, unixgram, and protocol types supported by the net package. The default protocol is tcp.
It uses \n
or \t\n
as the data terminator, and forwards it to the routing processor. The routing supports configuring regular expressions, and the data that meets the configured regular expressions will be forwarded to the routing for processing.
# Type
endpoint/net
# Startup configuration
Field | Type | Required | Description | Default |
---|---|---|---|---|
Protocol | string | Yes | Protocol tcp/udp, and protocol types supported by the net package | tcp |
Server | string | Yes | The address of the server, in the format of host:port, such as (:8888) | 0 |
ReadTimeout | int | No | Used to set the timeout for reading data, in seconds, can be 0 for no timeout | 60 |
# Examples
The following are example codes using endpoint:
Edit this page on GitHub (opens new window)
Last Updated: 2024/10/30, 13:29:22