networking with c#

I want to make a game. But more important is that i want to create my own server-client system using c#.
But here is were i need a bit help to start.
Can i use sockets for this?
Do i need a server with a solid ip?
Can i use peer to peer?
How do i handel routers and firewalls?

Or should i stick to unity-networkview?
(sry for bad english)

thanks for reply

I would suggest using something that has already been built (which is many thousands of hours of work).

There is Photon, Bolt, uLink and loads of other networking libraries you can look at.

Me personally I use photon networking. It is probably the most simplest one out there and the cloud servers they offer are pretty cheap. I mean I am 14 and I am just about wrapping things up with a multiplayer game that I made from scratch. The plugin is free and you also get 20 users on the server for free for testing. It works very well and very easy to use. It is also very similar to unity’s own api if you have ever tried that. The only thing I would say is wrong with it would be the documentation. I would look quill18creates tutorial if you want to learn to use it.

I went further in networking now and realized that all the pre build stuff is not what i want. I will set it up by myself because i want to create my own networking system. I want to run my game via server or localhost.

uLink and Photon can both be run by you via a Dedicated Server or localhost. If your going to do your own though I would suggest using Lidgren as your starting point as it will save you a whole lot of time and energy.