pmsumner: (Default)
posted by [personal profile] pmsumner at 11:32pm on 02/03/2009 under ,
My final (maybe) work-related-geekery post. I beat it into submission. I don't know why I was finding it so difficult. It's always the way - after you've figured it out it all seems so obvious in retrospect.

It involved a complete rewrite, which I firstly implemented using the Winsock Revamped component I linked to previously, and used the multiple-threadedness to my advantage (the wskClient.OnReceiveData event fires independently of the main thread, which means the main thread could be left looping Application.DoEvents (a new discovery for me) until certain conditions were met). I then rewrote the networking bits which I'd abstracted over to make life easy, using the System.Net.Sockets namespace. Surprisingly easy after I'd got the workings right - I suspect that I could easily change to using any other back-end I wanted with little trouble.

For the FTP connections I've cheated a little and used the Enterprise Distributed Technologies edtFTPnet component. Makes life so much easier :)

I also generalised lots of stuff which I'd assumed would be the same (for example - the prompts on different units are subtly different, the same files can be found in different directories) and put in lots of error-checking that I left out my initial experimentation.

I still haven't got everything perfect, but now I've got the right logical flow going on, I'm much happier with how it all works and am actually pleased with the results and understand how it works - instead of being pleased that things work but not knowing why.
Mood:: 'tired' tired

Reply

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

May

SunMonTueWedThuFriSat
      1
 
2
 
3
 
4
5
 
6
 
7
 
8
 
9
 
10
 
11
 
12
 
13
 
14
 
15
 
16
 
17
 
18
 
19
 
20
 
21
 
22
 
23
 
24
 
25
 
26
 
27
 
28
 
29
 
30
 
31