TCP commands
TCP commands contains functions to obtain and manipulate information related to the TCP layer, such as sockopt:
-
TCP:reject() — Allows the user to reject a TCP connection from a client.
-
TCP:set_snat_ip(str) — Allows the user to set the backend TCP connection’s source address and port.
-
TCP:clear_snat_ip() — Allows the user to clear any IP that was set using the set_snat_ip() command.
-
TCP:sockopt() — Can set or get various socket/IP/TCP operations, such as buffer size, timeout, MSS, etc. For client-side events, this command applies to the client-side socket; for server-side events, it applies to server-side socket.
-
TCP:after_timer_set() — Allows the user to create and schedule a timer with a callback function and timeout value. This allows you to create multiple timers each with a unique callback function name.
-
TCP:after_timer_cancel() — Allows the user to cancel a scheduled timer. This function can only cancel a timer before it is triggered if it is not periodic.
-
TCP:after_timer_get() — Allows the user to get the information about the scheduled timers.
-
TCP:close() — Allows the user to close the TCP connection immediately.