Skip to content

Commit

Permalink
modifiable MAX_FILE_BUFFER_SIZE, TARGET_DIRECTORY, fix client remote …
Browse files Browse the repository at this point in the history
…address print on connect
  • Loading branch information
mxyns committed Nov 26, 2020
1 parent d363820 commit c3caee3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fileio/fileio.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"time"
)

const MAX_FILE_BUFFER_SIZE = 8192
var MAX_FILE_BUFFER_SIZE uint32 = 8192

func ClearDir(path string) {

Expand Down
2 changes: 1 addition & 1 deletion filet/Server.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func (s *Server) Start() {
s.Clients = append(s.Clients, &socket)
go func() {
log.WithFields(log.Fields{
"address": socket.RemoteAddr(),
"address": socket.RemoteAddr().String(),
}).Debug("Client connected")
defer socket.Close()
s.handleClient(&socket)
Expand Down
7 changes: 5 additions & 2 deletions filet/requests/defaultRequests/FileRequest.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ import (
"strings"
)

const (
var (
TARGET_DIRECTORY = "dl"
FILE_REQUEST_ID = 2
)

const (
FILE_REQUEST_ID = 2
)

type FileRequest struct {
Expand Down

0 comments on commit c3caee3

Please sign in to comment.