Skip to content

Commit 15deb59

Browse files
committed
veb: new fasthttp module with -d new_veb (multithreaded, epoll/kqueue): makes veb multithreaded and fixes frequent hangs
1 parent 2f54c48 commit 15deb59

18 files changed

Lines changed: 1357 additions & 1138 deletions

File tree

‎examples/veb/header.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang=en>
33
<head>
44
<meta charset=utf-8>
5-
<title>vweb example page</title>
5+
<title>veb example page</title>
66
</head>
77
<body>
8-
header <br><br>
8+
header from included header.html <br><br>

‎examples/veb/veb_example.v‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ pub fn (mut app App) user_endpoint(mut ctx Context, user string) veb.Result {
3535
}
3636

3737
pub fn (mut app App) index() veb.Result {
38+
println('veb_example.v index()')
3839
mut c := 0
3940
lock app.state {
4041
app.state.cnt++
@@ -70,8 +71,9 @@ pub fn (mut app App) post(mut ctx Context) veb.Result {
7071

7172
fn main() {
7273
println('veb example')
73-
// veb.run(&App{}, port)
7474
mut app := &App{}
75+
// veb.run(&App{}, port)
76+
7577
veb.run_at[App, Context](mut app, port: port, family: .ip, timeout_in_seconds: 2) or {
7678
panic(err)
7779
}

0 commit comments

Comments
 (0)