Gopcap

command module
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2018 License: GPL-3.0 Imports: 2 Imported by: 0

README

Gopcap

A HTTP web server based on pcap TCP layer.

Install:

go get github.com/Lqlsoftware/Gopcap

Complie:

Include Gopcap in your $GOPATH.

export GOPATH=$GOPATH:(your go get dir)/github.com/Lqlsoftware/Gopcap

then

go build gopcap
go build main.go (Optional.) 

Usage:

Put static html to "./root/".

go run main.go
or
./main

Develop

Import gopcap package:

import "github.com/Lqlsoftware/gopcap"

Write a handle function like:

func handler(req *http.HttpRequest, rep *http.HttpResponse) {
    rep.Write("Hello World!\n")
}

Bind your handle function with an URL:

gopcap.Bind("/", http.GET, handler)

Start server with port:

gopcap.Start(8998)

Enjoy!

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
src

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL