Pudu programming language
Menu

Std.Http.Server.serveConnection

1 declaration

fn

serveConnection: &Std.Http.Server.Server -> &Std.Net.Connection -> Bool

This is a callable function.

What it does

Serve one connection: read a request, answer it, and say whether the

connection may carry another.

A connection is kept open unless something said otherwise, because opening

one costs a round trip and a client fetching a page makes many requests.

The response always states its own length, so the client knows where the

body ends without the connection closing to tell it.

Read the signature

  • The text after the name is the type checked by Pudu.
  • Read arrows from left to right: inputs come first, and the final type is returned.
  • & borrows a value for this call instead of moving or copying it.

Back to Std.Http.ServerSearch related declarations