Giter Site home page Giter Site logo

Comments (3)

StanBJAVS avatar StanBJAVS commented on August 27, 2024

Started with a memory stream....

byte[] bytes = File.ReadAllBytes(openFileDialog.FileName);
var memStream = new MemoryStream(bytes);

created a new client with the filename to send to the server....
var client = new TftpClient(ipAddress.Text, 69);
var transfer = client.Upload(openFileDialog.FileName);

Set up my events for tracking....
transfer.OnProgress += Transfer_OnProgress;
transfer.OnFinished += Transfer_OnFinished;
transfer.OnError += Transfer_OnError;

And then use
transfer.Start(memStream);

but nothing happens. I sit in a tight Task.Delay().Wait() loop waiting for my file to transfer until I get an Error or Finished message, but the debugger shows NONE of my messages being hit, and the filestream never advances past the first chunk.

Gonna download the repository and see if I can figure out what's going wrong.....

from tftp.net.

StanBJAVS avatar StanBJAVS commented on August 27, 2024

NOTE: When the initial "write" fails and has to retry, apparently somebody triggers a "negotiation result" message. The NotImplemented Exception stops the transfer for some reason. Implementing the null handler in all cases fixes the crash and allows for error recovery.

So this is the fix to my problem - implement a null handler for the OnOptionAcknowledgement() stub in all cases OR comment out the throw notImplemented in the base interface.

from tftp.net.

Callisto82 avatar Callisto82 commented on August 27, 2024

Thanks for debugging this! I removed those NotImplementedExceptions() from StateThatExpectsMessagesFromDefaultEndPoint.

from tftp.net.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.