Tentative de récupération de fichier (problème: récupération bloquante)
This commit is contained in:
@@ -2,17 +2,17 @@ package managers
|
||||
|
||||
import (
|
||||
"StoreBackEnd/pkg/protocol/repository"
|
||||
"bufio"
|
||||
"net"
|
||||
)
|
||||
|
||||
type RequestManager struct {
|
||||
Repository *repository.ProtocolRepository
|
||||
}
|
||||
|
||||
func (receiver RequestManager) Execute(request string, reader *bufio.Reader) string {
|
||||
func (receiver RequestManager) Execute(request string, reader net.Conn) string {
|
||||
// On lis ce que l'on reçoit
|
||||
result, executed, readCb := receiver.Repository.ExecuteReader(request)
|
||||
println("TESTTESTETTETT")
|
||||
|
||||
// On renvoie la réponse (Comment pour fichier ?)
|
||||
if executed {
|
||||
if readCb != nil {
|
||||
@@ -23,8 +23,6 @@ func (receiver RequestManager) Execute(request string, reader *bufio.Reader) str
|
||||
}
|
||||
return result
|
||||
} else {
|
||||
println("HMMM")
|
||||
// TODO : Renvoyer qu'une erreur est survenue
|
||||
return "Error occurred while execute command"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user