NAME

Event::IO::Record - buffered asynchronous I/O, timeouts

METHODS

new ( named parameters... )

init

If true (default), generate an init_event immediately (otherwise you must call init_event later).

timeout

Default timeout; see Timeout method.

irs, ors

Input/output record separators; default irs => "\r?[\0\n]", ors => "\n".

handle

Handle for connection, should be an IO::Socket object (::INET or ::UNIX).

timeout ( time )

Time is the time in seconds; 0 disables; undef reinitializes the current value. We generates a timeout_event when the timer expires.

init_event

Initialization event, called before anything else happens.

read_event

Data is available for reading. We buffer it up and emit lines to derived classes as line_events.

line_event ( line )

Override in derived class to process incoming data.

write( data )

Buffered write.

write_event

Write event - handle buffered writes.

timer ( enable flag )

Disable or restart inactivity timer.

timeout_event

Inactivity timeout event.

close

Remove event handlers, this will close the connection (as long as no other outstanding references exist).

closed

Return true iff socket is closed.

error( message )

Log error, subclasses may do more.

IRS( [ input record separator ] )

Get/set input record separator.

ORS( [ output record separator ] )

Get/set output record separator.

AUTHOR

David B. Robins <dbrobins@davidrobins.net>