Home Contents | # mtd16.attach | Mtd16io | Core4 Lua Event System

## SYNOPSIS

msghandle = mtd16.attach(app, fd)

## DESCRIPTION

Attach a new message handler to a file descriptor. The handler is attached to the event processor passed in app and exchanges messages on the open file descriptor fd.

Often, fd is an open TCP/IP network connection.

## RETURN VALUE

Returns a message handler instance.

## NOTES

This handler exchanges raw MTD16 message without any error recovery. Do not use on plain serial ports, but only with transport protocols that have their own reliable means of transport, like TCP/IP.

## SEE ALSO

mtd16io:close, mtd16io.event, mtd16io.eof