ssl - TCP service as WCF service -


i have tcp based service expose through wcf. service api similar tcplistener class (actually based on it), accepts tcp connections clients , sends , receive raw stream derived objects through client class. create wcf wrapper allow send , receive objects, taking advantage of wcf serialization.

the basic contract contains 2 operations, send , receive, , formatting schemaless json, client can specify protocol on connection, ready accept of them.

it should work ssl. @ moment, when have work ssl have wrap tcpclient.getstream() in sslstream peformance poor. use service without hack, , use wcf ssl doing like:

            <binding name="mybinding">                <security mode="transport">                  <transport clientcredentialtype="windows" />                 </security>             </binding>    

these doubts far:

  1. what need create? custom transport or custom binding?

  2. is there special should implement allow wcf track/manage lifetime of service or client connections?

cheers.

  1. you want create security setting on bindings in example. this page msdn article security settings wcf bindings. believe sslstream wrapper should correct way handle - not sure why performance bad. can @ this question slow sslstream because of buffering incorrectly. depending on how using socket this answer talks slow performance because of how encode binary data. if sending many small messages particular setup pretty slow. second link suggests using google's proto-buf libraries.

  2. what mean track/manage lifetime? mean timing out stale connections? believe handled tcplistener.

i know might not have answered question without more details hard determine exact reason slowness.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -