I have copy and paste a code snippet example of a N+ server and change it a bit for own use.
We use portForwarding in the router.
When I execute this code and use the browser with a intern address 192.168.1.55:66777/ledon then the code works perfect.
But when I execute the code and use the browser with my extern ip address [IPADDRESS]:66777/ledon then I must 2 times enter the browser, the code will then execute but after I get a error exception in the code: Using socketConnection As Socket = socketServer.Accept()
When I change .Poll(-1, ... In .Poll(50000,... then it works perfect.
Now my question:
I do not know why I get an error and what's the difference between, Is there any difference in handling local and external calls?
Thank You Ellen.
Using socketServer = New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp) socketServer.Bind(New IPEndPoint(IPAddress.Any, intPort)) socketServer.Listen(1) While True Try Using socketConnection As Socket = socketServer.Accept() If socketConnection.Poll(-1, SelectMode.SelectRead) Then