端点是在 app.config 中创建的,如下所示,但是如何创建具有不同地址的多个端点?
应用程序配置:
<service name="PokerService.PlayerService" behaviorConfiguration="ServiceBehaviorPlayer">
<host>
<baseAddresses>
<add baseAddress="net.tcp://localhost:5054" />
</baseAddresses>
</host>
<!-- Service Endpoints -->
<endpoint address="player" binding="netTcpBinding" bindingConfiguration="PlayerBinding" contract="PokerService.IPlayerService" />
<endpoint address="player/mex" binding="mexTcpBinding" name="ServiceBehaviorPlayer" contract="IMetadataExchange" />
</service>
</services>
但我怎么能像这样生成Tcp//localhost/player/1 ( 1-1000)
。有人知道吗?