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:
Option Explicit Private Sub Form_Load() Winsock1.LocalPort = 50 Winsock1.RemotePort = 90 Winsock1.RemoteHost = "192.168.1.1" Winsock1.Protocol = sckUDPProtocol Winsock1.Bind Winsock1.LocalPort End Sub Private Sub Text1_Change() Winsock1.SendData Text1.Text End Sub Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long) Dim m_data As String Winsock1.GetData m_data Label1.Caption = m_data End Sub
Client Code:
VB Code:
Option Explicit Private Sub Form_Load() Winsock1.LocalPort = 90 Winsock1.RemotePort = 50 Winsock1.RemoteHost = "192.168.1.1" Winsock1.Protocol = sckUDPProtocol Winsock1.Bind Winsock1.LocalPort End Sub Private Sub Text1_Change() Winsock1.SendData Text1.Text End Sub Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long) Dim m_data As String Winsock1.GetData m_data Label1.Caption = m_data End Sub
Thanks
arunb




Reply With Quote