how to use an IP in a string with IPEndPoint
how to use an IP in a string with IPEndPoint
how to use an IP in a string with IPEndPoint
how to use an IP in a string with IPEndPoint
how to use an IP in a string with IPEndPoint
how to use an IP in a string with IPEndPoint how to use an IP in a string with IPEndPoint how to use an IP in a string with IPEndPoint how to use an IP in a string with IPEndPoint how to use an IP in a string with IPEndPoint how to use an IP in a string with IPEndPoint how to use an IP in a string with IPEndPoint how to use an IP in a string with IPEndPoint
how to use an IP in a string with IPEndPoint how to use an IP in a string with IPEndPoint
how to use an IP in a string with IPEndPoint
Go Back  Xtreme Visual Basic Talk > > > how to use an IP in a string with IPEndPoint


Reply
 
Thread Tools Display Modes
  #1  
Old 12-04-2004, 12:40 PM
peanutman's Avatar
peanutman peanutman is offline
Junior Contributor
 
Join Date: Sep 2003
Location: Belgium
Posts: 316
Default how to use an IP in a string with IPEndPoint


i would like to connect a socket to a server who's ip is stored in a string

Code:
Dim IpTarget As New IPEndPoint(??????????????, 1683) Sock.Connect(IpTarget)

what does the ??????? has to be to make it work
i tried stuff like "Dim IpTarget As New IPEndPoint("207.46.104.20", 1683)"
but that doesn't work... so the string should be converted to something first
but what???

Reinout,
__________________
http://free-b.org
Reply With Quote
  #2  
Old 12-04-2004, 02:24 PM
excaliber's Avatar
excaliberhow to use an IP in a string with IPEndPoint excaliber is offline
Senior Contributor

* Expert *
 
Join Date: Nov 2002
Location: Ohio, USA
Posts: 1,828
Default

Code:
Dim tempIPAddress As System.Net.IPAddress Dim IPTarget As New System.Net.IPEndPoint(tempIPAddress .Parse("127.0.0.1"), 1683)
__________________
RandomIRC - Your neighborhood's friendly IRC channel (irc.randomirc.com - #code)

"Perl - The only language that looks the same before and after RSA encryption."
Reply With Quote
  #3  
Old 12-04-2004, 02:25 PM
excaliber's Avatar
excaliberhow to use an IP in a string with IPEndPoint excaliber is offline
Senior Contributor

* Expert *
 
Join Date: Nov 2002
Location: Ohio, USA
Posts: 1,828
Default

On second thought, use this, it is shorter and avoids a needless declaration:

Code:
Dim IPTarget As New System.Net.IPEndPoint(System.Net.IPAddress.Parse("127.0.0.1"), 1683)
__________________
RandomIRC - Your neighborhood's friendly IRC channel (irc.randomirc.com - #code)

"Perl - The only language that looks the same before and after RSA encryption."
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
how to use an IP in a string with IPEndPoint
how to use an IP in a string with IPEndPoint
how to use an IP in a string with IPEndPoint how to use an IP in a string with IPEndPoint
how to use an IP in a string with IPEndPoint
how to use an IP in a string with IPEndPoint
how to use an IP in a string with IPEndPoint how to use an IP in a string with IPEndPoint how to use an IP in a string with IPEndPoint how to use an IP in a string with IPEndPoint how to use an IP in a string with IPEndPoint how to use an IP in a string with IPEndPoint how to use an IP in a string with IPEndPoint
how to use an IP in a string with IPEndPoint
how to use an IP in a string with IPEndPoint
 
how to use an IP in a string with IPEndPoint
how to use an IP in a string with IPEndPoint
 
-->