|  Developer
Updated on November 14, 2021

set_handler()

  • Set a custom events handler. If wasn’t called this is the only one way to get I/O async notifications for handler.
  • After this call sends events for the handler only to a specified events handler.
Edit
  • params: hndl (int), events handler script (string).
  • return: nothing
Edit
				
					require "network"

handle = network.connect({ ip = "127.0.0.1", port = "6010", connection_type = "TCP" })
network.set_handler(handle, "events_handler")