Agregar archivos de proyecto.
This commit is contained in:
15
NetRemoting.vb
Normal file
15
NetRemoting.vb
Normal file
@@ -0,0 +1,15 @@
|
||||
Imports System.Runtime.Remoting
|
||||
|
||||
Public Class NetRemoting
|
||||
Shared Sub IniciaServicioNR(Puerto As Integer, Nombre As String, tipo As Type)
|
||||
Dim ht As New Hashtable
|
||||
ht("port") = Puerto
|
||||
ht("name") = Nombre
|
||||
Dim serverProvTcp As New System.Runtime.Remoting.Channels.BinaryServerFormatterSinkProvider
|
||||
serverProvTcp.TypeFilterLevel = Runtime.Serialization.Formatters.TypeFilterLevel.Full
|
||||
Dim clientProvTcp As New System.Runtime.Remoting.Channels.BinaryClientFormatterSinkProvider
|
||||
Dim tc As System.Runtime.Remoting.Channels.Tcp.TcpChannel = New System.Runtime.Remoting.Channels.Tcp.TcpChannel(ht, clientProvTcp, serverProvTcp)
|
||||
System.Runtime.Remoting.RemotingConfiguration.RegisterWellKnownServiceType(tipo, Nombre & ".soap", WellKnownObjectMode.Singleton)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user