postMessage

fun postMessage(message: Any?, transfer: <Error class: unknown class><MessagePortMain> = definedExternally)(source)

Send a message to the child process, optionally transferring ownership of zero or more MessagePortMain objects.

For example: