![]() This Conn method, read a remote file and checks if content is a simple ip address (as 192.168.25.52) or if is a Dns host name (as ), if is a Dns host name, Reed Kimble - "When you do things right, people won't be sure you've done anything at Kimble, firstly, thank you very much for you answer! Reed Kimble - "When you do things right, people won't be sure you've done anything at all" Using as there are a couple ways to do this and you'll need the newer VS (2013 or 2015) to use the easiest solution (you can use 2010 but it requires an extra installation). I suspect you can write this much more cleanly, but it would be helpful to know the version of Visual Studio that you are there seems to be unnecessary threads and timers involved. So just execute the web request synchronously.įinally, it looks like the TcpClient isn't really being used correctly. You could make the web request asynchronously if you didn't want it to block, but you're blocking anyway when calling join. there doesn't seem to be any purpose to the secondary thread. I don't really understand the design on the conn() method. You should test if theĬurrent character is NOT alpha and return false otherwise return true at the end of the loop. ![]() You return True when the first alpha character is found so the method checks for any single alpha character instead of checking for all alpha characters. Next, your CheckForAlphaCharacters method doesn't work correctly. Well, there are a number of issues here.įirst, what do you call a "No-IP" address? Is that a DNS host name? The code treats it as a DNS host name so I'm just trying to make sure that is what you expect. So, someone can help me to find where I'm making wrong? Private Sub Timer2_Tick(sender As Object, e As EventArgs) Handles Timer2.Tick Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load Public Sub Connect(hostname As String, port As Integer) Public Sub Connect(address As IPAddress, port As Integer) Public Sub Connect(ipAddresses() As IPAddress, port As Integer) : Public Sub Connect(remoteEP As IPEndPoint) I can see that TcpClient.Connect have several definitions and my Sub Connect() above indicates for this definition in file TcpClient If CheckForAlphaCharacters(ip) Then 'Check if ip address is a No-ip (seeing that No-ip contains only letters)ĭim hostname As IPHostEntry = Dns.GetHostByName(ip) 'Noipĭim Noip As IPAddress() = hostname.AddressList InStream = New StreamReader(webresponse.GetResponseStream()) ![]() WebRequest = webRequest.Create(Decrypt1("kTbXQ圜7KwzyNTyQNzfQqN0rg2CMhKdwNWvBts6hS7Q=")) 'Read a remote. Sub Connect(ByVal h As String, ByVal p As Integer)ĭim t As New Threading.Thread(AddressOf RC, 10) '''''''''''' THESE FUNCTIONS ARE PRESENT IN SocketClient.vb class ''''''''''''' Public Class SocketClient If Char.IsLetter(StringToCheck.Chars(i)) Then Public Function CheckForAlphaCharacters(ByVal StringToCheck As String) As Boolean ''''''''' FUNCTION IS PRESENT IN MY Func.vb module ''''''''''' Module Func All my firewall programs are disableds.Īnd until now without success for connect to server aplication.Ĭurrently I'm using this code to connect client to server aplication:.Release all ports of connection in my router that are necessary.Then I already made all settings correctly of kind: I have a Remote Access Tool aplication and I need receive connections of my clients using No-ip service, already that my ip address is dynamic.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |