Port

From CauchoWiki

Jump to: navigation, search


It is possible to configure Resin to listen to custom protocols using the <port> directive. <port> is like <http> or <srun> in that it listens to a port and accepts connections, but it allows you to choose a custom protocol.

In fact, <http> and <srun> are specializations of port:

[edit] Configuring a HTTP port

<resin xmlns="http://caucho.com/ns/resin"
       xmlns:resin="http://caucho.com/ns/resin/core">
...
<server>
  <port host="localhost" port="8080">
    <protocol resin:type="com.caucho.server.http.HttpProtocol"/>
  </port>
  ...
</server>
</resin>


[edit] Configuring a Srun port outside of a cluster

<resin xmlns="http://caucho.com/ns/resin"
       xmlns:resin="http://caucho.com/ns/resin/core">
...
<server>
  <port host="localhost port="6802">
    <protocol resin:type="com.caucho.server.hmux.HmuxProtocol"/>
  </port>
  ...
</server>
</resin>
Retrieved from "http://wiki.caucho.com/Port"
Personal tools