Files
2026-08-27 11:22:34 -06:00

62 lines
1.4 KiB
VB.net

Imports System
Imports System.Net
Imports System.Net.Sockets
Imports System.Threading
' Token: 0x02000021 RID: 33
Public Class BridgeEndPoint
' Token: 0x0600026D RID: 621 RVA: 0x0001332C File Offset: 0x0001152C
Public Sub New(localport As Integer, remoteIP As String, key As String)
bool_0 = True
Try
string_1 = key
tcpListener_0 = New TcpListener(IPAddress.Any, localport)
tcpListener_0.Start(20)
string_0 = remoteIP
Dim thread As Thread = New Thread(AddressOf method_0)
thread.Start()
Catch ex As Exception
Close()
End Try
End Sub
Private Sub method_0()
Try
While bool_0
Dim tcpClient_ As TcpClient = tcpListener_0.AcceptTcpClient()
While tcpClient_0 Is Nothing
Thread.Sleep(100)
End While
Dim tcpClient_2 As TcpClient = tcpClient_0
tcpClient_0 = Nothing
Dim [class] As Relay = New Relay()
[class].method_0(tcpClient_, tcpClient_2)
tcpClient_1 = tcpClient_2
Thread.Sleep(100)
End While
Catch ex As Exception
End Try
End Sub
Public Shared Sub Close()
Try
tcpListener_0.[Stop]()
bool_0 = False
Catch ex As Exception
End Try
End Sub
Private Shared tcpListener_0 As TcpListener
Private string_0 As String
Public string_1 As String
Public tcpClient_0 As TcpClient
Public tcpClient_1 As TcpClient
Private Shared bool_0 As Boolean
End Class