[Solved] Miracles inside Photon3DotNet.dll

Options
KEMBL
edited July 2012 in DotNet
Hello all! :)

Who can explain how internaly work PhotonPeer.Connect method? It only points to this.peerBase.Connect(serverAddress, applicationName, node) which is abstract. :?: :?: :?: I think it somhow connects to NConnect class, but cant find middle chain to understand where my priblem :( It seems like reflector6 somehow broke real class structure. Is any sources of Photon3DotNet.dll exists yet?

More about problem:

Have a trouble, when try to understand why cant connect by TCP to Photon3 server from CLR SQL Server Stored Procedure with help of Photon3DotNet.dll (3.0.1.5).

PhotonPeer.Connect(args) == true and Netstat shows, that connection to 5055 established, but in server application logs have no information like this:

2012-07-03 10:19:09,138 [21] DEBUG Photon.SocketServer.ApplicationBase - OnInit - ConnID=3, IP 127.0.0.1 on port 5055

And more, no information at all in any server log files :( When I try to connect with demo .Net client all works perfect.
Also, cant send operation after connect from CLR, because error state for this. :cry:

Comments

  • Tobias
    Options
    The source for the inner classes of Photon client libs is not available and we don't really want to explain how they work. Use this layer of Photon as is and concentrate on making your game.

    You can't connect to a SQL Server with the Photon 3 client, cause it's not a SQL Client. It exclusively talks to Photon servers. Use TCP or some DB Connector.

    > When I try to connect with demo .Net client all works perfect.
    Then what are you doing differently? If the demo works, try to mimick it. Maybe you simply don't have a game loop to call Service()?

    > Also, cant send operation after connect from CLR, because error state for this
    You said you didn't connect at all. So you can't send operations. Fix connection first, then send operations.
  • KEMBL
    Options
    Hello, Tobias!

    >You can't connect to a SQL Server with the Photon 3 client, cause it's not a SQL Client.

    :) You will wonder, but I am not connect from Client to Sql, otherwise, I connect from SQL server to Photon3 server with support of Photon3DotNet.dll :) It is possible, and I had solved this problem two years ago with Photon2, today I try to remake this job for Photon3.

    The technology which allows me to do this is called "CLR stored procedures" it described there http://searchsqlserver.techtarget.com/t ... procedures
    And one more example there http://msdn.microsoft.com/en-us/library ... 6(v=sql.90).aspx

    1) How this technology may help to game developers? Think, you can build link like that: WEB <-> SQL <-> Proton3 Server and send commands (kick, invite, give some, etc.) to Proton3 server from different web interfaces. I will use linux server and can't use Mono on it, because of performance.

    2) Why not just make of WEB <-> Photon abstract layer? This will be big work to copy almost all already exists .Net classes from .Net Client to PHP by many reasons.

    >> Also, cant send operation after connect from CLR, because error state for this
    >You said you didn't connect at all. So you can't send operations. Fix connection first, then send operations.

    :) When I said " why cant connect by TCP to Photon3", I did mean that I cant do all steps from connection to work with operations. PhotonPeer.Connect(args)step was end with true, and I can see live connection in windows "netstat -ano" command. Sorry I was not clear!

    > If the demo works, try to mimick it. Maybe you simply don't have a game loop to call Service()?

    Thank you for this great idea!!! Probable, I was comment this call when was remake client for Photon3. I will try it tomorrow!
  • Tobias
    Options
    Hm. Photon or the Photon3DotNet.dll should not affect any other task you do in the client or server. If you're not able to connect to the DB, then something else must be wrong (too).
    There is no hint what goes wrong for the DB connection?
  • KEMBL
    Options
    Tobias, you :ugeek: was right! It was not enought Service() calls, for now all work with a speed of light! Shame on me!
    Let the Force will be with you, always! :)