Mse à jours du système de réception message + fichier. Il reste à pouvoir vider correctement un fichier lorsqu'il est reçu

This commit is contained in:
Benjamin
2022-03-08 14:48:14 +01:00
parent 30e21ce042
commit bcf8cdd256
5 changed files with 24 additions and 11 deletions

View File

@@ -37,11 +37,11 @@ func main() {
protocolRepository.AddWriter(&helloRule)
// Creation of the SendOkRule
sendOkRule := writers.CreateSendOkRule("^SEND_OK\n$")
sendOkRule := writers.CreateSendOkRule("^SEND_OK\r\n$")
protocolRepository.AddWriter(&sendOkRule)
// Creation of the SendErrorRule
sendErrorRule := writers.CreateSendOkRule("^SEND_ERROR\n$")
sendErrorRule := writers.CreateSendOkRule("^SEND_ERROR\r\n$")
protocolRepository.AddWriter(&sendErrorRule)
/**
@@ -52,7 +52,7 @@ func main() {
protocolRepository.AddReader(&eraseFileRule)
// Creation of the SendFileRule // TODO reset to 50,200
sendFileRule := readers.CreateSendFileRule("^SENDFILE ([A-Za-z0-9.]{1,200} [0-9]{1,10} [A-Za-z0-9.]{50,200})\r\n$")
sendFileRule := readers.CreateSendFileRule("^SENDFILE ([A-Za-z0-9.]{1,200}) ([0-9]{1,10}) ([A-Za-z0-9.]{50,200})\r\n$")
protocolRepository.AddReader(&sendFileRule)
// Create a Multicast Client & run it