Good enough
This commit is contained in:
parent
736310d469
commit
3b250d1058
@ -102,7 +102,6 @@ func handleConnection(conn net.Conn, privateKey *rsa.PrivateKey) {
|
||||
|
||||
fmt.Println("Exchange, OK!")
|
||||
|
||||
// Receive and handle multiple files
|
||||
for {
|
||||
var chunks []string
|
||||
for {
|
||||
@ -120,12 +119,11 @@ func handleConnection(conn net.Conn, privateKey *rsa.PrivateKey) {
|
||||
|
||||
conn.Write([]byte("Received and decrypted chunk\n"))
|
||||
}
|
||||
|
||||
go decryptAndHandle(chunks, key, iv, uid)
|
||||
|
||||
conn.Write([]byte("Received and decrypted\n"))
|
||||
|
||||
// Check if there are more files to receive
|
||||
|
||||
moreFiles, err := bufio.NewReader(conn).ReadString('\n')
|
||||
if err != nil {
|
||||
log.Printf("Error reading more files signal: %v", err)
|
||||
|
Loading…
Reference in New Issue
Block a user