Solved

What is a sink in remoting vb.net

Posted on 2008-10-01
4
302 Views
Last Modified: 2013-11-07
Hi!

Need some help to understand what a sink is in remoting.

Do I need to use it?
What is it for?
When should I use it?

for example what does this do


Dim serverProv As BinaryServerFormatterSinkProvider = New BinaryServerFormatterSinkProvider

 Dim clientProv As BinaryClientFormatterSinkProvider = New BinaryClientFormatterSinkProvider

  serverProv.TypeFilterLevel = System.Runtime.Serialization.Formatters.TypeFilterLevel.Full

 Dim props As IDictionary = New Hashtable
 

        props("port") = 0

        Channel = New System.Runtime.Remoting.Channels.tcp.TcpChannel(props, clientProv, serverProv)

Open in new window

0
Comment
Question by:AWestEng
  • 2
  • 2
4 Comments
 
LVL 11

Accepted Solution

by:
melmers earned 500 total points
ID: 22621514
Sinks are a additional layer in the .NET Remoting communication. YOu can use it to implement things an authentication layer which is added to every messeage that your client sends to your server.

To describing it here would use much space. So on codeproject is a very good tutorial

http://www.codeproject.com/KB/IP/customsinks.aspx
0
 
LVL 1

Author Comment

by:AWestEng
ID: 22622480
oki thx,
but if I dont provide a sink to the channel it will create a default one?, but was is good practice hare, should I still add some type of sink?
0
 
LVL 11

Expert Comment

by:melmers
ID: 22622493
When you can use the default one why implement one ?
Sinks are complicated for beginners so why implement one.
every additional implemented sink or code must be tested.
so when you can use the default one use it.
0
 
LVL 1

Author Comment

by:AWestEng
ID: 22623017
good point.
thx man :)
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now