operations on specific clients

Options
sebako
edited January 2011 in DotNet
Hey Guys,

is there any way to send an operation to specific clients/a group of clients only and not to every client connected?
if so, where should i look to implement this?

Thanks

Seb

Comments

  • Boris
    Options
    I assume you use Lite and that you want to send a message to just a few clients in a game and not to everybody? There is an optional RaiseEvent parameter for it: actors of type int[]. check out the RaiseEventOperation class and invoke it via OpCustom- the client's litePeer does not provide a predefined RaiseEvent method with this parameter out of the box.
    Hope that helps.
  • yep thats what i was looking for, thank you. :)

    Just one other Question, is it possible to connect to multiple applications at the same time (from the client)?

    Cheers
  • Tobias
    Options
    It's not possible to connect to multiple applications with one peer. However, you could use multiple peers with separate applications.
    This way you could also better differentiate between different origins of events, e.g..

    I would be interested to know how you are going to use it.
  • well what i intend to do is to have multiple games running on the server, but they sharing a chatsystem.
    so that players are able to chat across game rooms. thought to create a chat application handling chat.
    and the other things to handle are done by the game applications.

    but if i have an application "game1" and an application "game2" they won't be able to chat with each other, right?
    I need some way around that.

    as well as i want to have global database access across applications, so that i do not need to write the database code for every single application. is the server internally allowed to access other applications on the serverside only? that actually would solve it. ^^
  • Boris
    Options
    you'd either have to use two peers as tobias suggested or use a single app for your different games.
  • Boris
    Options
    sebako wrote:
    is the server internally allowed to access other applications on the serverside only? that actually would solve it. ^^
    to solve this you could write an application wrapper that instantiates multiple applications.
    photon would start the application wrapper, and if you host it as default app you could still use multiple application ids. you can read the actual application id from the init request param of the photon.socketserver.application.CreatePeer override and then select the app that should handle it.
  • Okay thank you, i am gonna play with it a bit and take a look for the smartest solution, i will create a new post in case i am stuck anywhere. Thanks for all the nice help. much appreciated.

    Ah one more thing, do you have any code examples regarding that? I am still new to C# , so still digging the language actually :)