I started to setup a Server and a Client for personal purpose. When I try to connect the Server by a computer inside a shared network, with local IPs, works but when I try to connect an external IP, doesn't work.[code]
SocketException was Unhandled: Only one usage of each socket address (protocol/network address/port) is normally permitted I get this error every time i click collect a second time.
I am writing a socket client into my application. I have multiple socket connections to make to different servers. ClientSocket(1).BeginConnect(endpoint1, AddressOf Connected, Nothing) ClientSocket(2).BeginConnect(endpoint2, AddressOf Connected, Nothing) Both clients call the connected sub... how do I know which one is which? Private Sub Connected(ByVal ar As IAsyncResult)
I want to develop a function that will return the external [public] IP from my router. Not the Internal [local] IP, something like 192.168.1.X. But something like this 216.XXX.XXX.XXX
I'm trying to use a socket to connect a TCP stream. The socket connects no problem if the endpoint has a valid IP associated to it. If I give it an invalid one, the Connect method will sit and block (I want it to) for 10-20 seconds before telling me the remote host timed out. Is there a timeout property I can set so I don't have to wait that long for the connect method? Or is there another way of doing it that does implement a timeout?
I'm using sockets to connect to servers and for some strange reason I can't identify, the socket is taking several seconds (5 maybe 6) seconds to connect when using an IP whereas is instant when using a hostname. Here is my code to connect:[code...]
In the above code, server of course is a string. I've tested this with a friend and she's experiencing the same issue and I'd like to get around it as it's sort of annoying..While debugging GetHostEntry is the line that seems to take forever when using an IP.
i need to check if a port is open, apparently i can't ping ports so i need to use sockets, and it seems that there is no option for timeout on the connecting... how can i put a timeout on connect?
How can I detect the External IP Address of machine which is running my Application. By External IP address means that IP Address through which PC running my Application is accessible through Internet. and not the local IP Address .
Does anyone know how I could get my app to show the ISP of the machine it is running on, I can get internal and external IP addresses, just need to know if possible and how to look up ISP from this information[url]...
I'm using VB.NET 2003 Application program. i need to get External IP Address (internet). i searched internet and found come codes and tried that...i tried this code... but it returned my internal IP Address...
Code:
And i tried this code too...
Code:
But its always returns (m.fail) instead of (m.Success). so i'm not able to get External Ip address.
Using command window - Immediate, i get values for "r" and "m". and m.success = false...
Quote:
I don't have fire wall setup in my machine. and i have internet access too...anything wrong in that code.. or anything i'm missing... if anyone have any idea how to find out the External Ip Address.
Need to get local and external IP address to display in my app, but then if possible somehow lookup the ISP using the external IP address got following code to get hostname and local IP address, but it is showing IPv6 address when I would prefer the IPv4 one
Does anyone know how I could get my app to show the ISP of the machine it is running on, I can get internal and external IP addresses, just need to know if possible and how to look up ISP from this information
How can i use the address bar to send commands to a external application?
Example:
AOL Instant Messenger -
I havent used this application in a long time. But i remembered if you wanted to add a friend to AIM from their online profile it directed them to a link such as:
aim:addfriend=contactID
and AIM would pick this up and add it the contactID to the application. The link i posted is more than likely not the correct link they use but it shows what im trying to accomplish.
Im looking to achieve something along the lines of:
I have a server and a client working with sockets. I run the server at my laptop, sending its internal IP to my Hotmail account and I run my client at my desktop. I enter the internal IP and connect fine! But when I tried to connect with my cousin's PC, which is not in my network, I entered its external IP and the client couldn't connect.
Here is the code for the Server (consists of 2 forms): Form 1 (Server): Imports System.Net Imports System.Net.Sockets Imports System.IO Imports Microsoft.Win32 Imports System.Net.Mail [Code] .....
I'm trying to connect to an external device using a serial port. I found a couple of tutorials with demo code and tried these. Unfortunately they all return the same gibberish unreadible result.[code]I'm sure my port settings are correct (I have the communication protocol of the device.)
I have 1 process that acts as a server (TcpListener) and one or more processes that act as clients (TcpClient). The clients are sending Tcp requests to the server every 1-2 seconds to which the server responds with a result message.
In normal conditions the server will use TcpListener.Stop when it closes, but sometimes the server will crash (for whatever reason) and then this is not done. If I then try to restart then I get the following error:
"Only one usage of each socket address (protocol/network address/port) is normally permitted"
I only get this error when there are clients running who keep trying to connect despite the TcpListener is not there anymore (crashed).I don't get this error when I first manually close/kill all clients before restarting the server/TcpListener.I'm looking for an automatic recovery procedure that deals with this error/problem. How can this be done?Below you'll find code examples of the server and the client.BTW: Although the codes examples are in VB.NET, I can also handle C# code. That's why I tagged this question with both VB and C#.Code example for server/TcpListener:
Public Shared Sub Thread_TcpListener_GUI() While True Dim tcpClient As TcpClient = Nothing Dim tcpListener As TcpListener = Nothing
I wrote a Socket Client which will send the Socket Server some data and get some response from Server. This process will be running once in every 2 seconds.
Now what I need to know is How we can identify the connection lost between Server and Client?
I need this to be implemented in the Client side. If there is no connection then Client should automatically close the connection. Once the connection with the server is available in the next attempt it should connect automatically.
Im using VB2005 express and the app im creating uses the web browser control.Basically I want to know if its possible to make the web browser control connect through a different ip address and port from your default web browser.
Below is my code, but when i send the message thru client socket i receive Specified argument was out of the range of valid values. Parameter name: size
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim serverStream As NetworkStream = clientSocket.GetStream() Dim outStream As Byte() = _ System.Text.Encoding.ASCII.GetBytes("0800822000000000000004000000000000000920092126012345001")
Are there any IP Address filters or masks available in Windows Forms as per following screenshot? A backslash shouldn't be allowed or it should be filtered somehow.
I made web browser which consist address bar that I use it to type addressess in it i.ewhen I type [URL] it opens [URL] but when I go to anther page in google it doesnot show it's link in address bar lix InterntExplorer or other international browsers so how to show any link or any sub page's link in my browser address bar ?
I'm trying to use the DHCP API (using the references on pinvoke.net) to retrieve a computer's MAC address when given the IP address but I can't get the code to work. I've run all the C# code on pinvoke.net through the C#-to-VB converter but I'm stuck now.
Here's what I have so far. The value of res is always 5 (should be 0). Thing is, I can't find any documentation on what the return codes mean
vb Private Sub GetMACDim client As String = "1.1.1.1" Dim server As String = "0.0.0.0" Dim si As New NativeMethods.DHCP_SEARCH_INFO si.SearchType = NativeMethods.DHCP_SEARCH_INFO_TYPE.DhcpClientIpAddress si.ClientIpAddress = Convert.ToUInt32(StringIPAddressToUint32(client)) Dim res As UInteger Dim oInfo As IntPtr
I wanted to know if it is possible to Zip a folder without any external dll nor any external references - just with native features.I've been able to Zip files with System.IO.Packaging, but it does not include folders and I cannot tell it to Zip the parent folder.I know there are external dll and so, but I'd like to know if it's possible to make it from a native way.