Archived
This forum has been archived. Please start a new discussion on GitHub.
Implementing ICE on a different lay of transport, possible?
in Help Center
Hi all,
I have the following question. I would like to know which are the steps I should take to implement Ice on a different lay of transport, such serial connection or a CAN bus (similar to serial link). My aim is to stablish Ice connection between two machines, connected by serial link. I suppose I should take the same functions Ice uses to implement its connection. In some way, Ice, in its sources must specify when it connects a tcpendpoint how and where it connects, but I haven't found that functions in the src.
Any suggestion will be appreciate.
Thanks in advance!
and my congratulations for Ice implementers, for such a great tool!
I have the following question. I would like to know which are the steps I should take to implement Ice on a different lay of transport, such serial connection or a CAN bus (similar to serial link). My aim is to stablish Ice connection between two machines, connected by serial link. I suppose I should take the same functions Ice uses to implement its connection. In some way, Ice, in its sources must specify when it connects a tcpendpoint how and where it connects, but I haven't found that functions in the src.
Any suggestion will be appreciate.
Thanks in advance!
and my congratulations for Ice implementers, for such a great tool!
0
Comments
-
You could write a new transport plug-in, similar to the SSL plug-in. Unfortunately, we do not have any documentation for this. But you could study the source code of the SSL plug-in as an example, as well as the built-in TCP or UDP transports (which are much simpler than the SSL plug-in, and therefore easier to understand).0
-
You could write a new transport plug-in, similar to the SSL plug-in.
hehe, I hava try to build a project to support serial link. It's use the plugin mechanism.
but when I found that the ThreadPool use 'select' function to process incoming sockets. I'am in anxious.
I have studied all the Ice source code ,It's a impossible way to implement a trasport protocol without socket. isn't it?0 -
If you use the thread pool model, then you must have a select-able protocol. Under Linux or Unix, it doesn't have to be sockets. All reads and writes on file descriptors are select-able. Under Windows, I'm afraid you indeed can only use sockets.
There is an alternative. You can use the thread-per-connection model, in which case the transport does not have to be select-able. You can use this model with Ice.ThreadPerConnection=1. For example, Glacier2 uses this model, to make sure that no malicious client can take away threads from other connected clients.0 -
Unknown propertyIf you use the thread pool model, then you must have a select-able protocol. Under Linux or Unix, it doesn't have to be sockets. All reads and writes on file descriptors are select-able. Under Windows, I'm afraid you indeed can only use sockets.
Thanks,I'm working under Windows.You can use this model with Ice.ThreadPerConnection=1
when I add the property in config file, run my client demo, a warning occur,
warning: unknown property: Ice.ThreadPerConnection why?
by the way,my Ice version is 1.5.10 -
Thread per connection has been introduced with Ice 2.1.0
-
Thank you!
Thanks a lot! I will try to build my project with 2.1 .0