I couldn't find any documentation, and Kerm said to create a topic, so here it is.
I'm mildly interested in writing my own methaub and some virtual hubs, but to do that I need documentation on the protocol between gcnclient and the metahub.
I'm not sure where to start, so I'll be beginning at the beginning, I guess.
What does gcnclient say when it first connects, identifying the virtual hub it wants to connect to and the local hub name?
You should take a look at my C# calcnet library. It should give you some idea of the protocol and everything. I can explain stuff if you have any questions on it.
I'll look into it. Thank you.
I'll almost certainly have some questions since I want to create a metahub while what you have is a client, but it should still help Smile
Just to give you a basic idea, the protocol works something like:

1) gCnClient connects to gCn metahub
2) gCnClient specifyies a virtual hub name. gCn metahub adds that IP:port:clientname to the virtual hub's endpoints ('J' message)
3a) When calculators connect to the client, it tells the metahub that there's a new connected calculator ('C' message)
3b) A broadcast message gets sent from one calculator to every other calculator on the virtual hub ('B' message)
3c) A frame message is sent from one calculator to one other ('F' message)
4) There is no current way to remove a calculator without disconnecting the client from the virtual hub, which I didn't realize until just now.
For frame messages, can they only be sent to calculators that the virtual hub knows are there? (It might be there, but the virtual hub might not know it, if the calc is connected but has never sent a message.)
calcdude84se wrote:
For frame messages, can they only be sent to calculators that the virtual hub knows are there? (It might be there, but the virtual hub might not know it, if the calc is connected but has never sent a message.)
The client does not prevent a frame from being sent to a nonexistent calculator; the clients only track their local calculators, and do not know all the calculators on the virtual hub. However, as the hub knows all calculators present, it will silently drop messages sent to unknown endpoints, as it would have no idea which client to forward the frame to. The protocol requires that all present calculators announce themselves. Oh, and since you're looking to make a service bridge, I should mention that by convention bridges take the address $AA,$AA,$AA,$AA,$AA.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement