Jump to content

Check out our Community Blogs

Register and join over 40,000 other developers!

Recent Status Updates

View All Updates

- - - - -

What's Better For Gambling Server Using Sockets Or Web-Service?

server C# online game

  • Please log in to reply
2 replies to this topic

#1 plb


    CC Newcomer

  • Member
  • PipPip
  • 19 posts

Posted 03 June 2012 - 08:30 AM

I've not been here for a while and I see that things have changed here. I hope this topic is there where it should be.

I've created card game and now creating server. I have 2 options first write C# application and use sockets (TCP protocol) or create php web-service. What would be better solution (I have almost the same experience with C# and PHP)?
  • 0

#2 gregwarner


    Obi Wan of Programming

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1586 posts
  • Location:Arkansas
  • Programming Language:C, Java, C++, C#, PHP, Transact-SQL

Posted 03 June 2012 - 09:23 AM

The language of choice really doesn't make a difference so long as you make sure to implement SSL encryption (via HTTPS if you're going the web service route) and protect your server from attacks. A web service might be easier to exploit than a dedicated C# service application, since anyone with a browser can simply spam your service with random data until they come across a weakness, but the same can be done to any service regardless of the transport medium, so be sure to write your communication protocols in such a way so as to make it robust and resilient to attacks.

Both languages have sufficient features to allow this to be done.

  • 1

Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
– Douglas Hofstadter, Gödel, Escher, Bach: An Eternal Golden Braid

#3 BlackRabbit


    CodeCall Legend

  • Expert Member
  • PipPipPipPipPipPipPipPip
  • 3871 posts
  • Location:Argentina
  • Programming Language:C, C++, C#, PHP, JavaScript, Transact-SQL, Bash, Others
  • Learning:Java, Others

Posted 03 June 2012 - 11:11 AM

nothing to add, greg has gave you the answer, security and protocol are the keywords if you go global, if it is just a game for you and friends security is not an issue :D
  • 0

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download