Initial project import

This commit is contained in:
Agila Forge Importer committed 2026-07-13 15:20:32 +00:00
commit 23f2d29e32
11957 files changed
+1754577

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
module fasthttp
pub struct Server {
pub:
port int = 3000
max_request_buffer_size int = 8192
mut:
request_handler fn (HttpRequest) !HttpResponse @[required]
}
// new_server creates and initializes a new Server instance.
pub fn new_server(config ServerConfig) !&Server {
mut server := &Server{
port: config.port
max_request_buffer_size: config.max_request_buffer_size
request_handler: config.handler
}
return server
}
// run starts the server and begins listening for incoming connections.
pub fn (mut server Server) run() ! {
println('TODO: implement fasthttp.Server.run on windows')
}