_ServerConnHandler

This is the network notification handler for the server. It uses PayloadBuilder to assemble request Payload objects using received chunks of data. Functions in this class execute within the TCPConnection actor.

class ref _ServerConnHandler is
  TCPConnectionNotify ref

Implements


Constructors

create

new iso create(
  handlermaker: HandlerFactory val,
  logger: Logger val,
  reversedns: (AmbientAuth val | NetAuth val | DNSAuth val | 
    None val),
  registry: HTTPServer tag)
: _ServerConnHandler iso^

Parameters

Returns


Public Functions

accepted

Accept the incoming TCP connection and create the actor that will manage further communication, and the message parser that feeds it.

fun ref accepted(
  conn: TCPConnection ref)
: None val

Parameters

Returns


received

Pass chunks of data to the HTTPParser for this session. It will then pass completed information on the the HTTPSession.

fun ref received(
  conn: TCPConnection ref,
  data: Array[U8 val] iso,
  times: USize val)
: Bool val

Parameters

Returns


throttled

Notification that the TCP connection to the client can not accept data for a while.

fun ref throttled(
  conn: TCPConnection ref)
: None val

Parameters

Returns


unthrottled

Notification that the TCP connection can resume accepting data.

fun ref unthrottled(
  conn: TCPConnection ref)
: None val

Parameters

Returns


closed

The connection has been closed. Abort the session.

fun ref closed(
  conn: TCPConnection ref)
: None val

Parameters

Returns


connect_failed

The connect has failed. TODO: is it a case for server-side?

fun ref connect_failed(
  conn: TCPConnection ref)
: None val

Parameters

Returns


connecting

fun ref connecting(
  conn: TCPConnection ref,
  count: U32 val)
: None val

Parameters

Returns


connected

fun ref connected(
  conn: TCPConnection ref)
: None val

Parameters

Returns


auth_failed

fun ref auth_failed(
  conn: TCPConnection ref)
: None val

Parameters

Returns


sent

fun ref sent(
  conn: TCPConnection ref,
  data: (String val | Array[U8 val] val))
: (String val | Array[U8 val] val)

Parameters

Returns


sentv

fun ref sentv(
  conn: TCPConnection ref,
  data: ByteSeqIter val)
: ByteSeqIter val

Parameters

Returns


expect

fun ref expect(
  conn: TCPConnection ref,
  qty: USize val)
: USize val

Parameters

Returns