Get the App
SLTechnology News&Howtos  ›  Development  › 

Analysis of how to implement login Ftp by VB.NET

Shulou Source: shulou.com Published: 2022-06-02 11:41:12 09月17日 Update

In this issue, Xiaobian will bring you analysis on how to implement landing Ftp in VB. NET. The article is rich in content and analyzes and narrates from a professional perspective. After reading this article, I hope you can gain something.

VB. NET practical tutorial teaches you today for VB. NET landing Ftp method, take a look at learning it. We all know that remote video transmission can use thread download, image compression, and can also be considered to be stored in the database first.

VB. NET Practical Tutorial Code:

Private sckConnect As New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp) Private RemoteIp As IPEndPoint Private thd As Thread Private blnExt As Boolean = True Private _Quality As Int16 = 50 Public WriteOnly Property Quality() As Int16 'This function indicates the image quality requested by the server Set(ByVal value As Int16) _Quality = value End Set End Property Private Sub run() Dim byt() As Byte Dim stream As MemoryStream Dim bmp As Bitmap While blnExt Try bmp = getGrcToBmp() 'This is Get Picture stream = New MemoryStream Compress(bmp, stream, _Quality) 'Compression function applied to image here byt = stream.ToArray sckConnect.Send(byt, byt.Length, SocketFlags.None) byt.Initialize() stream = Nothing Thread.Sleep(30) '30 milliseconds, or 33 images per second Catch ex As Exception Call Ext() End Try End While End Sub Public Sub Send(ByVal ip As String, ByVal port As Integer) 'IP and Port of server Try RemoteIp = New IPEndPoint(IPAddress.Parse(ip), port) sckConnect.SendTimeout = 100 sckConnect.Connect(RemoteIp) If sckConnect.Connected Then thd = New Thread(AddressOf run) thd.Start() End If Catch ex As Exception MsgBox(ex.Message) Exit Sub End Try End Sub Public Sub Ext() Try blnExt = False thd = Nothing sckConnect.Disconnect(True) sckConnect.Close() Catch ex As Exception End Try End Sub The above is how to carry out the analysis of VB. NET landing Ftp shared by everyone. If there are similar doubts, please refer to the above analysis for understanding. If you want to know more about it, please pay attention to the industry information channel.

Tags: Pictures analysis login utility content functions tutorials servers services professional small and medium-sized that is code rich content that is data databases articles methods more Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple MariaDB vpn Shulou Information Microsoft