最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
利用remoting实现文件传输
时间:2022-07-02 12:04:25 编辑:袖梨 来源:一聚教程网
因为工作需要写了一个文件传输的东东
使用了System.Runtime.Remoting
客户端接口类:
Namespace Nail.Net.Remoting.Trans
Public Interface iTransFile
Function SendFile(ByVal FileName As String, ByVal bytes() As Byte, ByVal ClientCrc As Integer) As Integer
Function CompareFile(ByVal FileName As String, ByVal ClientCrc As Integer) As Boolean
Function GetFileDet(ByVal FileName As String) As Integer
Function GetFileInfo(ByVal FileName As String) As Byte()
Function GetFileInfo(ByVal FileName As String, ByVal Length As Integer) As Byte()
Function GetFileInfo(ByVal FileName As String, ByVal Point As Integer, ByVal Length As Integer) As Byte()
Property ServerTransSaveFilePath() As String
Property ServerTempFilePath() As String
End Interface
End Namespace
客户端类:(文件传输的实现在此)(包含1个窗体 后面窗体代码我会贴出来)(请添加引用System.Runtime.Remoting .net默认是不引用的 服务器端类同样)
Imports System.Runtime
Imports System.Runtime.Remoting
Imports System.Runtime.Remoting.Channels
Imports System.Runtime.Remoting.Channels.Tcp
Imports System.IO
Imports System.Threading
Namespace Nail.Net.Remoting.Client
Public Class FileTransClient
Private TransTempSize As Integer
使用了System.Runtime.Remoting
客户端接口类:
Namespace Nail.Net.Remoting.Trans
Public Interface iTransFile
Function SendFile(ByVal FileName As String, ByVal bytes() As Byte, ByVal ClientCrc As Integer) As Integer
Function CompareFile(ByVal FileName As String, ByVal ClientCrc As Integer) As Boolean
Function GetFileDet(ByVal FileName As String) As Integer
Function GetFileInfo(ByVal FileName As String) As Byte()
Function GetFileInfo(ByVal FileName As String, ByVal Length As Integer) As Byte()
Function GetFileInfo(ByVal FileName As String, ByVal Point As Integer, ByVal Length As Integer) As Byte()
Property ServerTransSaveFilePath() As String
Property ServerTempFilePath() As String
End Interface
End Namespace
客户端类:(文件传输的实现在此)(包含1个窗体 后面窗体代码我会贴出来)(请添加引用System.Runtime.Remoting .net默认是不引用的 服务器端类同样)
Imports System.Runtime
Imports System.Runtime.Remoting
Imports System.Runtime.Remoting.Channels
Imports System.Runtime.Remoting.Channels.Tcp
Imports System.IO
Imports System.Threading
Namespace Nail.Net.Remoting.Client
Public Class FileTransClient
Private TransTempSize As Integer
相关文章
- 《弓箭传说2》新手玩法介绍 01-16
- 《地下城与勇士:起源》断桥烟雨多买多送活动内容一览 01-16
- 《差不多高手》醉拳龙技能特点分享 01-16
- 《鬼谷八荒》毕方尾羽解除限制道具推荐 01-16
- 《地下城与勇士:起源》阿拉德首次迎新春活动内容一览 01-16
- 《差不多高手》情圣技能特点分享 01-16