Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

C# tcp socket/streaming - over internet

Options
  • 08-08-2013 9:06am
    #1
    Registered Users Posts: 1,586 ✭✭✭


    For a college project, I am hoping to develop a client/server model in C# that will allow the client to stream audio and video from the server. (Android device, streaming from PC)

    I have a rough understanding (still learning) of whats involved to develop the client and server apps , I understand using tcp sockets and ports, I should then be able to (eventually:)) achieve this over the internet using port forwarding on my router.

    Is this possible without port forwarding? How could I, say, have someone install an app(server) on their PC and the client on their phone, and have them communicate? What is required to do so?
    Would an internet server/website be required to proxy the connection somehow ?

    I have a long way to go with my studies before I attempt this but I was just hoping for some guidance on what is involved.

    Many thanks


Comments

  • Moderators, Computer Games Moderators, Technology & Internet Moderators Posts: 19,240 Mod ✭✭✭✭L.Jenkins


    Here's an intro into sockets programming in C#,

    http://www.codeproject.com/Articles/10649/An-Introduction-to-Socket-Programming-in-NET-using

    Hopefully this and some research will explain some concepts. I would also tell you to try, as it's never to early to learn. It could provide you with an advantage you need to get through your course.


  • Registered Users Posts: 1,922 ✭✭✭fergalr


    Gaz wrote: »
    For a college project, I am hoping to develop a client/server model in C# that will allow the client to stream audio and video from the server. (Android device, streaming from PC)

    I have a rough understanding (still learning) of whats involved to develop the client and server apps , I understand using tcp sockets and ports, I should then be able to (eventually:)) achieve this over the internet using port forwarding on my router.

    Is this possible without port forwarding? How could I, say, have someone install an app(server) on their PC and the client on their phone, and have them communicate? What is required to do so?
    Would an internet server/website be required to proxy the connection somehow ?

    I'm not a super deep computer networks guy, but basically, you are asking how to connect two machines that are both behind firewalls and NAT.

    The easiest way, for a once off app, is to do some sort of port forwarding, on the firewall or router device, that opens a hole in the firewall.
    Thats how people that play peer-to-peer video games tend to do things.


    After that, developers tend to use a publicly addressable server, that both ends can access, that acts as a proxy, or reflector, between the end points. (Or just simply use a client server architecture)
    Thats probably the most common solution architecture if you need to deploy something that works for a large number of users.


    There are other more exotic solutions, e.g.: http://samy.pl/chownat/ which you can read about.
    Don't expect solutions like that to work in every case and for every firewall, and expect difficulty making them work reliably across the complicated internet.

    Gaz wrote: »
    I have a long way to go with my studies before I attempt this but I was just hoping for some guidance on what is involved.

    Dont underestimate yourself, I doubt theres a long way from where you are to understanding this sort of stuff in detail, if you want to spend the time to dig into it.


  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    Gaz wrote: »
    For a college project, I am hoping to develop a client/server model in C# that will allow the client to stream audio and video from the server. (Android device, streaming from PC)
    You should (I'm not presuming you're not) be aware that native Android development is done in Java rather than C#. There are ways you can do this using C#. or you can instead develop a Windows Phone app instead, otherwise you'll need to get your Java up to speed (which fortunately is not a major thing if you're already competent in C#).


Advertisement