Computing.Net > Forums > Programming > client-server Winsock Application

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

client-server Winsock Application

Reply to Message Icon

Name: VASS
Date: October 28, 2003 at 15:13:47 Pacific
OS: WIN 98
CPU/Ram: 256
Comment:

Hello everybody. i want to create an application where a server will be able to send messages to client using Winsock. The clients can only receive the message and not be able to respond. I have made something but the program is using the same number for local and remort port. I can get a msg from the other computer but I can't send one. It really drives me craaaazy!! Any help will be much appriciated.

the first lines of the program are:
'set winsock properties
Winsock1.Protocol = sckUDPProtocol
Winsock1.LocalPort = 2167
Winsock1.RemotePort = 2167

Thank you in advance..



Sponsored Link
Ads by Google

Response Number 1
Name: Infinite Recursion
Date: October 28, 2003 at 20:50:21 Pacific
Reply:

Well, by the looks of it you are using Visual Basic 6.0, correct me if I am wrong.

Your two lines confuse me...

"...The clients can only receive the message and not be able to respond..."

and a few lines down...

"...I can get a msg from the other computer but I can't send one...

I was under the impression that you wanted the server side to send msg to the client... Then have the client to only view the msg, but not be able to reply. Is this not the case?

Well, for starters change one of your port settings to be different than the other. Local 2167 and Remote 2168 for instance. Then under the Data Arrival event of the client, have a msgbox or whatever mechanism you want display the data that the server sent over.

Post back if you still have problems.

IR


0

Response Number 2
Name: VASS
Date: November 2, 2003 at 19:14:11 Pacific
Reply:

Hello IR. Yes I do have VB6. I was trying to have the same program running as Server and as client, but apparently it doesn't work. Now I am trying to use a client and a server in two different programs. I am using different port numbers as you suggested and so far it's working. Thank you for your help. :-)


0

Response Number 3
Name: Infinite Recursion
Date: November 2, 2003 at 20:11:33 Pacific
Reply:

Glad you got it working. ;) Thanks for the update.

IR


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: client-server Winsock Application

How do I design VB client/servers www.computing.net/answers/programming/how-do-i-design-vb-clientservers/7764.html

UDP Client/Server code in JAVA www.computing.net/answers/programming/udp-clientserver-code-in-java/6201.html

simple client/server programming www.computing.net/answers/programming/simple-clientserver-programming/12666.html