Solved

What is a sink in remoting vb.net

Posted on 2008-10-01
4
308 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

695 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