Hi,

I changed the port forward settings to the folowing in my broadband router.
Here are the entries.

Name: CCL
Trigger Port: 50 - 50
Public Port: 90
Trigger Type: UDP
Public Type: UDP

I have also made a server and client application that uses winsock control, these applications communicate well with the 127.0.0.1 address.

I then changed the IP address to 192.168.1.1 (the ip address to my router-LAN address, the LAN address on my PC is through DHCP).

When I run the application I find that an error 'Run Time error 10054, the connection is reset by remote side' occurs.

Kindly advise how I can correct this I would like my server/client to run in an router environment.

Server Code:
VB Code:
  1. Option Explicit
  2.  
  3. Private Sub Form_Load()
  4.  
  5. Winsock1.LocalPort = 50
  6. Winsock1.RemotePort = 90
  7. Winsock1.RemoteHost = "192.168.1.1"
  8. Winsock1.Protocol = sckUDPProtocol
  9.  
  10. Winsock1.Bind Winsock1.LocalPort
  11.  
  12. End Sub
  13.  
  14. Private Sub Text1_Change()
  15.  
  16. Winsock1.SendData Text1.Text
  17.  
  18. End Sub
  19.  
  20.  
  21. Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
  22.  
  23. Dim m_data As String
  24.  
  25. Winsock1.GetData m_data
  26.  
  27. Label1.Caption = m_data
  28. End Sub

Client Code:

VB Code:
  1. Option Explicit
  2.  
  3. Private Sub Form_Load()
  4.  
  5. Winsock1.LocalPort = 90
  6. Winsock1.RemotePort = 50
  7. Winsock1.RemoteHost = "192.168.1.1"
  8. Winsock1.Protocol = sckUDPProtocol
  9.  
  10. Winsock1.Bind Winsock1.LocalPort
  11.  
  12. End Sub
  13.  
  14. Private Sub Text1_Change()
  15. Winsock1.SendData Text1.Text
  16.  
  17. End Sub
  18.  
  19. Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
  20.  
  21. Dim m_data As String
  22.  
  23. Winsock1.GetData m_data
  24.  
  25. Label1.Caption = m_data
  26.  
  27. End Sub



Thanks
arunb