In order to get SimEthereal working with steamworks’ p2p network model, I have to dig into spidermonkey’s internals. However, apart from comments in the source code, there is almost no documentation on what is supposed to be what.
I’d be glad if someone could explain what those classes/interfaces are and what role they/their implementations have in the communication:
Thanks in advance.
Connector - A single channel remote connection allowing the sending and receiving of data. As opposed to the Kernel, this will only ever receive data from one Endpoint and so bypasses the envelope wrapping.
Kernel - Defines the basic byte passing messaging kernel.
Endpoint - An abstract endpoint in a Kernel that can be used for sending/receiving messages within the kernel space.
Envelope - Encapsulates a received piece of data. This is used by the Kernel to track incoming chunks of data.
The kernel package is the heart of the JME networking module and controls the routing and dispatch of message data over different transport implementations. Most users will never have to deal with these classes unless they are writing their own client and server implementations that diverge from the standard classes that are provided.
Kernel defines the core of a server-side message broker that abstracts away the specific transport and underlying threading model used. For example, it might use NIO selectors in a single threaded model or straight multithreaded socket model. Or it might implement SSL connections. Once created, Kernel users don’t need to care about the details.
Endpoint is a managed connection within a Kernel providing kernel to client connectivity.
Connector defines the basic client-side message sender and these objects are typically used to connect to a Kernel though they can connect to any network port that supports the implementation’s protocol. Implementations are provided for straight TCP and UDP communication and could be extended to support SSL or different threading models.
Note: all of that is cut-pasted from the javadoc… but if we start there then the questions can be more specific and I don’t have to repeat as much.
Edit: In case you don’t know how to navigate javadoc well, the overview for the kernel package is here:
…which is where the last bit of what I pasted is from.