Fun and games with Visual Studio.NET
Aug. 11th, 2003 10:39 pmI got fed up with all the backup programs I could find and decided to write one myself. I've been promising people I'd write a file transfer program for a while, after all. How hard can it be, I asked myself....
Some time later....
I got something up and running that would take a character and return that character in upper case. That didn't take that long once I got my heard around the way that .NET works with TCP. The code mostly came from other places, but it took a while of playing around with it to actually understand what it was doing.
I could then telnet in and send characters one at a time - telnet's an invaluable resource when testing TCP applications, it really is.
Having done that I wanted to send whole words, from a Windows Form. So I knocked something up there and it actually worked first time (again, the code was ripped off from other places, but modified as I went along to do just what I wanted).
And then I tried to change it so that it wasn't talking to "localhost", but chatting on the actual IP address of the machine (not much point writing a file transfer program that only works on the machine it's on) and it all fell apart. I kept being told that my connection was being actively refused. It took me ages of looking for security settings before I realised there was no problem with security settings - the problem was that apparently localhost and the actual machine address are two different interfaces - telling it to listen on one isn't the same as listening on the other. 30 seconds later it's all working.
Now to play around with file creation...
Some time later....
I got something up and running that would take a character and return that character in upper case. That didn't take that long once I got my heard around the way that .NET works with TCP. The code mostly came from other places, but it took a while of playing around with it to actually understand what it was doing.
I could then telnet in and send characters one at a time - telnet's an invaluable resource when testing TCP applications, it really is.
Having done that I wanted to send whole words, from a Windows Form. So I knocked something up there and it actually worked first time (again, the code was ripped off from other places, but modified as I went along to do just what I wanted).
And then I tried to change it so that it wasn't talking to "localhost", but chatting on the actual IP address of the machine (not much point writing a file transfer program that only works on the machine it's on) and it all fell apart. I kept being told that my connection was being actively refused. It took me ages of looking for security settings before I realised there was no problem with security settings - the problem was that apparently localhost and the actual machine address are two different interfaces - telling it to listen on one isn't the same as listening on the other. 30 seconds later it's all working.
Now to play around with file creation...