Unless it is explicitly written that the event runs on a different thread then the event will run on the main thread. This is the case with ServerSocket, Socket and AsyncStreams events.
They do handle the communication with background threads however the events are delegated to the main thread.