Click to See Complete Forum and Search --> : about win32 programming
jonam
Feb 8th, 2002, 11:28 AM
about win32 programming. i have been trying to connect to a website using the standard socket , connect and recv calls. but although i am getting the connection and sending the data, i am not able to receive anything, why is it due to ? i have specified the port for the socket as 80 but the local port (as is seen from my log in the personal firewall) is said to be 1527, is it due that ? after waiting for a lot of time, the connection is said to close gracefully. please help me out in solving this problem.
amac
Feb 8th, 2002, 01:00 PM
have specified the port for the socket as 80 but the local port (as is seen from my log in the personal firewall) is said to be 1527
When you open a socket it has to have a port associated with it... Regardless whether or not it is setup to listen for incoming connections... So when you tell it to port 80... the socket is created and seeing how you are connecting to something it picks a non-standard port number... usually over 1000... This way the remote machine can send data back to you...
So the 1527... is right.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.