So anyone able to point me in the right direction in this area?
have you been in this area before?
got any tips :P
or is it just as easy as diving in and trial error :D
Writing network logic is never easy, especially if you want to address issues with hacking or mitigating the effects of latency. As for the actual connecting things together part, I'm sure there's an easy to integrate library for that in C#.
Screw libraries. Start simple, make a C# flat-file-only webserver. That'll teach you enough about basic 101-level networking in C#.
Google for examples. You'll find some really short and simple ones that you can improve on.
awesome suggestions anyone else got an input? like specific site with examples or a book/pdf???? i pretty much knew it was trial error based or learn from example just wondering if anyone got specific examples like motive suggested that can get you right into the deep end
the only semi-difficult thing about network programming is verifying data integrity. you have to be a bit OCD about security to write good network code. C# makes this all very easy but you still have to do quite a bit of integrity checking on the server's end. Basically think about every way you could take advantage of your server's code, if you can think it up, someone else can think it up.
Always "cap" your input fields on the server's end. Truncate data fields religiously if its a form submission, or use encryption if you're super OCD about it like me. The last server code I wrote basically was triple encrypting and verifying against every packet being sent out. Luckily the server wasn't going to need speed to operate properly, but you get the gist of it.
Well yeah honestly you basically set a goal for the data and give it no freedom whatsoever. If you have a 15 character text box input, when they submit that data, you make sure that every letter in that 15-character text box is an allowable character, the datais truncated to 15 characters, and the submittal key verifies against your server's encryption logic.
The 3rd is just for good measure, that way if you have a client->server relationship and you do it right, that client key will always verify that the data is coming from your software and not a malicious user's own code. On top of making sure the code coming through is not chopped and mutilated or potentially dangerous for your server to process (remote buffer overflow, etc).
I think you guys should remember the OP is at a very basic level right now. He shouldn't be even remotely worried about encryption until much, much later in the process of learning.
He should be focusing on the basics of maintaining P2P connections, or a large number of connections to a single node, in an efficient and OOP fashion.
ahh yes im not worried about most that just the P2P connection just for like a 2player minigame, so im probably sure that i wont need server management or data encryption and security. this isnt a serious game im making just a game to make to build my knowledge in the far reaches of VS2010
So anyone able to point me in the right direction in this area? have you been in this area before? got any tips :P or is it just as easy as diving in and trial error :D
Writing network logic is never easy, especially if you want to address issues with hacking or mitigating the effects of latency. As for the actual connecting things together part, I'm sure there's an easy to integrate library for that in C#.
@Catalisk: Go
Screw libraries. Start simple, make a C# flat-file-only webserver. That'll teach you enough about basic 101-level networking in C#. Google for examples. You'll find some really short and simple ones that you can improve on.
awesome suggestions anyone else got an input? like specific site with examples or a book/pdf???? i pretty much knew it was trial error based or learn from example just wondering if anyone got specific examples like motive suggested that can get you right into the deep end
the only semi-difficult thing about network programming is verifying data integrity. you have to be a bit OCD about security to write good network code. C# makes this all very easy but you still have to do quite a bit of integrity checking on the server's end. Basically think about every way you could take advantage of your server's code, if you can think it up, someone else can think it up.
Always "cap" your input fields on the server's end. Truncate data fields religiously if its a form submission, or use encryption if you're super OCD about it like me. The last server code I wrote basically was triple encrypting and verifying against every packet being sent out. Luckily the server wasn't going to need speed to operate properly, but you get the gist of it.
Writing network code itself is easy though.
@Mephs: Go
Better rule: If you can't think of it, someone else will, so only allow it to do what you want it to do.
@wOlfLisK: Go
Well yeah honestly you basically set a goal for the data and give it no freedom whatsoever. If you have a 15 character text box input, when they submit that data, you make sure that every letter in that 15-character text box is an allowable character, the datais truncated to 15 characters, and the submittal key verifies against your server's encryption logic.
The 3rd is just for good measure, that way if you have a client->server relationship and you do it right, that client key will always verify that the data is coming from your software and not a malicious user's own code. On top of making sure the code coming through is not chopped and mutilated or potentially dangerous for your server to process (remote buffer overflow, etc).
@Mephs: Go
I think you guys should remember the OP is at a very basic level right now. He shouldn't be even remotely worried about encryption until much, much later in the process of learning.
He should be focusing on the basics of maintaining P2P connections, or a large number of connections to a single node, in an efficient and OOP fashion.
ahh yes im not worried about most that just the P2P connection just for like a 2player minigame, so im probably sure that i wont need server management or data encryption and security. this isnt a serious game im making just a game to make to build my knowledge in the far reaches of VS2010
You only need to worry about cryptography when transmitting sensitive information so yeah, I doubt it's going to matter for what you're doing.