This project has moved and is read-only. For the latest updates, please go here.

Using code in WinForm application

May 16, 2016 at 11:25 PM
I am trying to use this library in a Win Form application. I am following the code in the sample server and I am running into a problem. When I use the following code
       using (var server = new TftpServer())
            server.OnReadRequest += new TftpServerEventHandler(server_OnReadRequest);
            server.OnWriteRequest += new TftpServerEventHandler(server_OnWriteRequest);
It does not work in Win Form, the Console.Read() does not block this thread and the server code just exits. I tried creating a thread but is not sure how to thread this out. Can any one give me some suggestion how to incorporate this code?