I have a Flash AS3 client application that sends data to a VB.NET server application using TCP/IP. When testing using loopback/localhost on a single machine the data comes through. However, when I set the IPs of the sockets to the corresponding computers of the LAN and run each application separately, there is no data reception.
VB.NET - This works:
Public Shared localAddress As IPAddress = IPAddress.IPv6Loopback
Public Shared port As Int32 = 8080
Public Shared server As New TcpListener(localAddress, port)
AS3 - This works:
var client : Client = new Client("localhost", 8080)
AS3 - This doesn't:
var client : Client = new Client("xxx.xxx.xxx.xxx", 8080)
I have checked that the port is open (i.e. ShieldsUp returns "Stealth"). I am not sure if I should be using NetConnection instead or if I could/should set up a Flash socket policy file - both computers are running Windows.
What is the most plausible reason for no connection? Any ideas?
Have you got a socket policy file in place? http://www.adobe.com/devnet/flashplayer/articles/socket_policy_files.html
Also, set up policy file logging so you get an idea of what's going on: http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7ec4.html
Also, final (dumb) point: are you sure both computers are on the same network, and that the ip is right (lan ip, not public ip)?