How can I do communicate with the other server engine?

Options
funtigger
edited February 2013 in Photon Server
First. My English skill is very low. Please I hope you will understand.

[Sample message structure on other server engine]
[code2=cpp]#pragma pack(push, 1)
struct MessageHeader
{
short messageCode;
int BodySize;
}
struct TestMessage : public MessageHeader
{
byte value_1byte;
int value_4byte;
public byte[] Serialize(object customObj);
public object Deserialize(byte[] byteStream);
}// It's size 5 byte. Serialized message has no hash-map key.
#pragma pack(pop)[/code2]
Photon message is using hash-map. but the other server message is structure stream by 1 byte order.
In this case, How can I do communicate between photon and the other server?

I found a way to serialize about custom object in forum. But Eventually the serialized message sent after wrapping in a hash-map.

How can I send the pure serialized message? Is it possible?

Comments

  • chvetsov
    Options
    Hi, funtigger!

    I think, you can NOT use photon peers for communication between different engines.
    Why? Becase photon peer not only sends data in special format, but it also expects data in special format. Photon Peer has it's own handshake. So you will have difuculties even on stage of connection. I mean you will not able even to connect photon and other engine without tricks.

    So, my suggestion is: use raw sockets to communicate between photon and different engines. or use Photon everywhere ;)
  • Thank you for your fast answer.
    So. i will use http protocol. ;)