server.vb

来自「一个饭店管理系统」· VB 代码 · 共 20 行

VB
20
字号
Imports System
Imports System.Runtime.Remoting
Imports System.Runtime.Remoting.Channels
Imports System.Runtime.Remoting.Channels.Tcp
Imports Microsoft.VisualBasic
'<Assembly:Version("1.0.0.0")> 
public module server
  Public sub main() 
  Dim  channel As TcpChannel = New TcpChannel(8000)
  ChannelServices.RegisterChannel(channel)
  RemotingConfiguration.RegisterWellKnownServiceType _
 (GetType(CoHello), "HelloDotNet",WellKnownObjectMode.Singleton)
  System.Console.WriteLine("Hit <enter> to exit...")
  System.Console.ReadLine(  )
  End sub
Public class CoHello
Inherits MarshalByRefObject 
  public Function SayHello(ByVal strName As String) As string
	dim msg as string
msg="Hi ! " + strName & ". 舧

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?