Comments (3)
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.
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.
Thanks for debugging this! I removed those NotImplementedExceptions() from StateThatExpectsMessagesFromDefaultEndPoint.
from tftp.net.
Related Issues (20)
- How i can change the default timeout. HOT 1
- TFTP Client Get & Put problem HOT 2
- Unable to get the copied file location. HOT 3
- Update the nuget package HOT 2
- Update the version information to 1.2
- Unable to send file (with filepath) HOT 1
- Sign the assembly in the nuget package HOT 5
- Create an own nuget package HOT 9
- TftpTransfer fallsbacks to default rather than proposed? HOT 3
- SampleClient produces a System.ObjectDisposedException exception HOT 11
- TftpClient does not provide a good way to add/remove options HOT 3
- Unhandled exception due to race condition in timer construction
- No Documentation HOT 1
- how can i use this library in a form project HOT 1
- RFC 2347 Options Extension HOT 3
- Timeout of Block Acknowledgement is always 5s and not timeout HOT 4
- Very slow transfer of a boot.wim file HOT 3
- Server does not transfer files when connecting from a different machine HOT 1
- Closing the stream. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tftp.net.