Fortinet black logo

TCP commands

TCP commands

TCP commands can be used in HTTP and TCP events.

TCP:local_port()

Return local TCP port of the connection. The value is integer.

TCP:remote_port()

Return remote TCP port of the connection. The value is integer.

TCP:client_port()

Return client TCP port of the connection. The value is integer.

TCP:server_port()

Return server TCP port of the connection. The value is integer. If the server is not connected, return nil.

TCP:close()

Close current TCP connection and disable its TCP events. This function can only be used in event SERVER_CONNECTED.

TCP commands

TCP commands can be used in HTTP and TCP events.

TCP:local_port()

Return local TCP port of the connection. The value is integer.

TCP:remote_port()

Return remote TCP port of the connection. The value is integer.

TCP:client_port()

Return client TCP port of the connection. The value is integer.

TCP:server_port()

Return server TCP port of the connection. The value is integer. If the server is not connected, return nil.

TCP:close()

Close current TCP connection and disable its TCP events. This function can only be used in event SERVER_CONNECTED.