Skip to content

Latest commit

 

History

History
74 lines (46 loc) · 1.18 KB

HttpServer.md

File metadata and controls

74 lines (46 loc) · 1.18 KB

HttpServer

Extends: Node

Description

A routable HTTP server for Godot

Property Descriptions

bind_address

var bind_address: String = "*"

The ip address to bind the server to. Use * for all IP addresses [*]

port

var port: int = 8080

The port to bind the server to. [8080]

server_identifier

var server_identifier: String = "GodotTPD"

The server identifier to use when responding to requests [GodotTPD]

Method Descriptions

_init

func _init(_logging: bool = false) -> void

Compile the required regex

register_router

func register_router(path: String, router: HttpRouter)

Register a new router to handle a specific path

Parameters

  • path: The path the router will handle. Supports a regular expression and the group matches will be available in HttpRequest.query_match.
  • router: The HttpRouter that will handle the request

start

func start()

Start the server

stop

func stop()

Stop the server and disconnect all clients