CTCPSocketServer::ReadCompleted - Exception

edited February 2010 in Photon Server
I am getting this error when attempting to send a "Testing" string to the server:

7888: 21:17:25.0160 - CTCPSocketServer::ReadCompleted - Exception - CTCPSocketServer::ProcessDataStream() - Invalid message format, expected 0xFC

Here is my test client code:

tcp.Connect("localhost", 4530);

Is it possible to handle the incoming data or do I have to conform to a predetermined message format? The reason I am asking is if I want to run a MUD using Photon and do not have control over the client how can I override the default behavior? I tried overriding everything I could in the Application class but it looks like this is at the C++ level.



  • You are right: the Photon Core is checking for a specific "package start sequence". It takes care of unexpected packages and length of messages and also includes a small protocol (the client usually initializes the connection by telling its target application and protocol, etc.). Because of these essential values, we can hardly open this up.

    MUD, in itself, defines a protocol, right? I never looked at them from a technical side (just played a few) but if I remember correctly, they could be played on a telnet client and anything else is nice to have.

    That's a tough challenge. Photon is currently not open enough to place your code directly onto the TCP stream.

    Photon provides more than just a transport protocol. It includes data-serialization (in form of key-value hashtables) and a framework for rpc-calls (we call those "operations").

    Removing all those things from Photon to have a "plain" TCP server is more work than from TCP upwards, I'd guess.

    Sorry. A real MUD (with plain text format communication) is not going to work in Photon.
  • edited February 2010
    Most MUDs working with telnet allow any stream of bytes to hit the server. I verified this by running my same TCP code against an existing MUD, I get the standard login response.
  • Err.
    No. Photon does not work as telnet server. Sorry.
  • Not a big deal, my client is Silverlight I just thought it would be nice to open it up to normal MUD clients.
Sign In or Register to comment.