startListener

open fun startListener(port: Int, routine: Runnable)

Method to start a new listener

Parameters

port

: port to use by the listener

routine

: routine to execute by the listener

Throws

when some errors have been occurred, for example same port for different listeners