Skip to content

SOCK_NONBLOCK / SOCK_CLOEXEC syscall issues #1148

Closed
@omar391

Description

@omar391

Running a sample socket code throws the following syscall issues:

package main
import "github.com/gofiber/fiber/v2"

func main() {
	app := fiber.New()

	app.Get("/get", func(c *fiber.Ctx) error {
		return c.SendString("Hello from GET!")
	})

	app.Post("/post", func(c *fiber.Ctx) error {
		return c.SendString("Hello from POST!")
	})

	_ = app.Listen(":3000")
}

Error:

../../../github.com/valyala/tcplisten@v1.0.0/socket_other.go:11:48: SOCK_NONBLOCK not declared by package syscall
../../../github.com/valyala/tcplisten@v1.0.0/socket_other.go:11:70: SOCK_CLOEXEC not declared by package syscall

GopherJS version:

GopherJS 1.18.0+go1.18.5

Build cmd:

GOOS=js GOARCH=ecmascript gopherjs build main.go

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions