server

package
v0.0.0-...-01d6d1d Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2022 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CONN_HOST = "127.0.0.1"
	CONN_PORT = "3000"
	CONN_TYPE = "tcp"
)

Variables

View Source
var Data = make(map[int]Info)
View Source
var MAX_SIZE int64

Functions

func InfoHandler

func InfoHandler(c *gin.Context)

func Run

func Run(numChannels int, maxFilesize int64)

Run, starts the server with the desired number of channels and desired max filesize.

func SplitRequest

func SplitRequest(req string) ([]string, error)

SplitRequest returns a []string of every part of the request. But first makes sure said request comply with the protocol.

Types

type Info

type Info struct {
	CurrFile string
	Filesize int64
	Total    int64
	Clients  map[int]string
	MaxSize  int64
}

Info Metadata

Jump to

Keyboard shortcuts

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