fileserver

package
v0.0.0-...-15d1ce6 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const READ = int(C.READ_MODE)
View Source
const WRITE = int(C.WRITE_MODE)

Variables

This section is empty.

Functions

This section is empty.

Types

type FileServer

type FileServer interface {
	StartServer(connections int) cerror.CPPError
	Accept() cerror.CPPError
	Close() cerror.CPPError
	HandleClientRequest() (bool, cerror.CPPError)
	IsServerRunning() (bool, cerror.CPPError)
	Free()
}

type FileServerImpl

type FileServerImpl struct {
	// contains filtered or unexported fields
}

func NewFileServer

func NewFileServer(port int, rootFolder string) FileServerImpl

NewFileServer creates a new instance of FileServer

func (*FileServerImpl) Accept

func (fs *FileServerImpl) Accept() cerror.CPPError

Accepts waits and accepts a client connection

func (*FileServerImpl) Close

func (fs *FileServerImpl) Close() cerror.CPPError

Close closes the connection to the server, returns false upon failure

func (*FileServerImpl) Free

func (fs *FileServerImpl) Free()

Free deallocates the memory allocataed to the FileClientImpl instance

func (*FileServerImpl) HandleClientRequest

func (fs *FileServerImpl) HandleClientRequest() (bool, cerror.CPPError)

TODO ftq will now return a request and this will be name name GetClientRequest

func (*FileServerImpl) IsServerRunning

func (fs *FileServerImpl) IsServerRunning() (bool, cerror.CPPError)

func (*FileServerImpl) StartServer

func (fs *FileServerImpl) StartServer(connections int) cerror.CPPError

Jump to

Keyboard shortcuts

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