Hey, that seemed to get it a little further than before. I am now getting the 
echo from the "Returning back to the main loop."
    
    
    if input.startsWith("download "):
                    var get_name = input[9..^1]
                    
                    let (dirPath, fileName) = splitPath(get_name)
                    echo "THIS IS WHAT IS BEING PASSED TO THE FUNCTION: ", 
fileName
                    
                    waitFor serve(fileName)
                    echo "Returning back to the main loop."
    
    
    Run

However, after echoing these to the screen, the cursor is blinking but not 
taking any input.

See output from client.
    
    
    Client Output -
    
    
    
    Enter a command > download c:\users\nater\desktop\thepark.jpg
    
    
    THIS IS WHAT IS BEING PASSED TO THE FUNCTION: thepark.jpg
    Server running!
    Waiting for client ...
    New client connected.
    Wait file
    File Size is 1413139
    End of file
    Client done.
    Returning back to the main loop.
    
    
    Run

The other commands work fine. It's only after the download that it seems to 
stop responding to text input. The server output is the same.
    
    
    Server Output -
    
    C:\Users\nater\Desktop\nim>server
    Client: connected to server on address 127.0.0.1:5555
    This is the file name: c:\users\nater\desktop\thepark.jpg
    File size is :1413139
    Send file size
    Pull ...
    End of file
    
    
    Run

Reply via email to