Brian's Waste of Time

Mon, 08 Aug 2005

TTMP CONNECT Handshake =)

Beat on TTMP some this evening, after doing a bunch of work on a top-secret project this morning. The best part is that I have no idea which project is more fun =) Yea!

Anyway, current state of the TTMP connection handshake:

Client sends a CONNECT frame:

CONNECT
login: [login name]
passcode: [passcode]

^@ 

Please excuse the use of [foo] instead of <foo> for required things. I am too lazy to escape them =)

Okay, so client sends that, server will either reply with an error indicating a failed login:

ERROR
message: [error message]

^@    

Or a CONNECTED

CONNECTED
session: [session id]

^@       

Yeah! You are connected. The login handshake has been implemented in ActiveMQ. It's a bit hacky because TTMP is much less chatty than the JMS spec, so the WireFormat implementation has to pretend there is more traffic than there really, but that is an implementation detail =)

I am not sure about requiring the session on every frame now that it is definately a connection-oriented protocol. The socket is certainly trackable, and requiring the session implies you can change sessions, which isn't something I think I want. Will muck around some, but am thinking hard of dropping that.

0 writebacks [/src/ttmp] permanent link