If you’re at all like me, I always have my friends bringing their computers over. We like to share stuff obviously, and although I always come up with some solution to the problem of “How do I get this file from my computer to yours?”, it’s never really the best answer, and generally involves a lot more work than it really needs to.
Last night, I was having a little LAN Party with 2 of my friends, and we were just hanging out playing all sorts of games like we do occasionally. But then of course one of my friends says, “Hey Ryan, lemme give you this file.”. Alright…too bad we don’t have a way for you to send it to me.
First try: “I’ll share a folder over the network and you can just drop it in there!” – FAILURE – Computers not in the same windows work group…
Second try: “Get on AIM, I’ll just send it to you!” – FAILURE – AIM sucks, and for whatever reason, I can never use it to send or receive files from any of the people that it matters for.
Third try: “Oh hold on I’ll put it on my USB Drive!” – FAILURE – “F***! I can’t find it. “
At this point, we are all angry. Suddenly I was struck with a thought. “Why don’t I just make my own program for LAN file transfers?”. Brilliance. Next came, “Why did it take me so long to think of that…”
So I spent a good bit of last night programming the night away like I generally do. I decided to write a simple thing in C#. Its nothing complex but it almost works. I’m having trouble making it so you can send files over about 50 MB though, which is a problem…
I get an exception on this line:
i = stream.Read(bytes, 0, bytes.Length);
It gives me an IOException and says:
Unable to read data from the transport connection: An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full.
I’m not really sure what to do about that. I’ve tried fiddling with a few things, but it didn’t do anything. I’m going to ask one of my friends who is a professional developer about it when i talk to him next. If anyone else has suggestions, though, I would really appreciate them.
So thats pretty much what I’ve done recently. Nothing huge, but hopefully once I get past this error it will be done. I’ll let ya know once I get it completely working. If someone would like to download it or use it, I will prolly package it and put it on one of my servers and post a link.