[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 329
  • Last Modified:

What is a sink in remoting vb.net

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
AWestEng
Asked:
AWestEng
  • 2
  • 2
1 Solution
 
melmersCommented:
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
 
AWestEngAuthor Commented:
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
 
melmersCommented:
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
 
AWestEngAuthor Commented:
good point.
thx man :)
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now