Method Protocols.HTTP.Server.Request()->attach_fd()


Method attach_fd

void attach_fd(Stdio.NonblockingStream _fd, Port|zero server, function(this_program:void) _request_callback, void|string already_data, void|function(this_program, array:void) _error_callback)

Description

Main entry point for the class.

Parameter _fd

Newly accepted connection.

Parameter server

Protocols.HTTP.Server.Port that accepted the connection.

Parameter _request_callback

Callback function registered with Protocols.HTTP.Server.Port().

Parameter already_data

Data that has already been received from _fd.

Parameter _error_callback

Callback function called when an error is detected.

Typically called from Protocols.HTTP.Server.Port()->new_connection().