Powered by MSDN

US - English
NEW! Silverlight 5 is available Learn More

Peer-to-peer IP Connections? RSS

5 replies

Last post Jul 01, 2008 11:17 AM by xanoxate

(0)
  • fromconcept

    fromconcept

    Member

    2 Points

    2 Posts

    Peer-to-peer IP Connections?

    Jul 01, 2008 10:37 AM | LINK

    Hi,

     I am just getting started with the technology, and wanted to know if it is possible to connect directly over TCP/IP to another session on the internet? The reason being that we are working on a game that would work better if we could connect to a second player directly.  We arent sure if this is possible with the technology.

     Many thanks

     Nick.

    Silverlight 2.0 Beta

  • Sergey.Lutay

    Sergey.Lutay

    Star

    13545 Points

    2379 Posts

    Re: Peer-to-peer IP Connections?

    Jul 01, 2008 10:50 AM | LINK

    Hi,

    Look here.

    Silverlight 2

    (If I answered the question, please click on "mark as answer".)

    Twitter

    Sincerely,
    Sergii Lutai

    MCT, MCPD, Head of Dev. Dept at DCT
  • xanoxate

    xanoxate

    Member

    85 Points

    23 Posts

    Re: Peer-to-peer IP Connections?

    Jul 01, 2008 10:50 AM | LINK

    Silverlight applications cannot listen for socket connections.

    The listen method is missing from the Socket class: Silverlight Socket Methods

    Compare this to the full version: Socket Methods

    I think that the functionality required to recieve socket connections was most likely not included for security reasons.

  • fromconcept

    fromconcept

    Member

    2 Points

    2 Posts

    Re: Peer-to-peer IP Connections?

    Jul 01, 2008 11:10 AM | LINK

    Thanks for the answer - I think the previous poster highlighted the problem first, but thanks anyway.  I'm now left wondeirng how I could create a web-based game with multi-players, other than having everything go back to the server of origin....I guess thats not too bad.

  • Sergey.Lutay

    Sergey.Lutay

    Star

    13545 Points

    2379 Posts

    Re: Peer-to-peer IP Connections?

    Jul 01, 2008 11:14 AM | LINK

    Thanks for "mark as answer"!

    Silverlight 2

    (If I answered the question, please click on "mark as answer".)

    Twitter

    Sincerely,
    Sergii Lutai

    MCT, MCPD, Head of Dev. Dept at DCT
  • xanoxate

    xanoxate

    Member

    85 Points

    23 Posts

    Re: Peer-to-peer IP Connections?

    Jul 01, 2008 11:17 AM | LINK

    You can use web service calls or sockets to connect to the server. 

    As far as I know the only way to create multiplayer games with silverlight is to connect the clients with each other through the server. They can't connect to each other directly if you are using just silverlight. You could set some kind of hybrid of silverlight and the full framework if you really wanted peer to peer connections. So part of your application would be a full framework app and the other part could be a silverlight app. But if you were going to go that way you you might be better off not using silverlight at all and just using the full framework.