Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Send data to TCP port
Message
De
02/06/2008 14:28:37
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
02/06/2008 14:21:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Divers
Thread ID:
01321081
Message ID:
01321099
Vues:
18
>Here is my code:
>WITH ThisForm.Winsock1.Object
> .Protocol = 0
> .remotehost = 'localhost'
> .remoteport = 1024
> .connect() && error here
> .SendData('123')
>ENDWITH
>
>I am getting an error from Winsock "Connection forcefully rejected .."
>Any idea?

Well, I never worked with that Winsock object. And I don't know whether all the parameters are correct. For instance, .RemoteHost... is "localhost" a valid option? If it requires an IP address, you might try 127.0.0.1 - the "local loopback address", in other words, "my own computer".

But mainly, I would suspect that you can't just send information to a port, like 1024, unless you first set up an application to "listen" at that port. Perhaps what the error message is telling you is: "There is no application set up to process information at the specified port."

Perhaps it would help to RTFM, in this case, you might find some documentation about the Winsock object - which might give you are more "human-readable" version of the error messages.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform