Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Send data to TCP port
Message
De
02/06/2008 14:15:38
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
02/06/2008 13:48:37
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:
01321095
Vues:
18
>I am trying to send data to a TCP port. What port should I use for my testing?
>
>Thanks

Ports 0-1023 are often reserved by different programs; for temporary ports, numbers >= 1024 are used.

This happens all the time; for instance, a Web server "listens" (1) on port 80. Now the client - say, Opera (a browser) - will send segments (2) with a destination port of 80, and an origin port of 1024 (or some other number). Let's assume it is port 1024. For the next file that is requested - another window, or another file for the same browser window (e.g. another image), the client will assign port 1025.

The client can not use port 80, because (a) it may itself function as a server, and (b) as outlined above, more than one simultaneous connection may be required.

It is also possible for programs to "listen" on higher port numbers. This happens especially with trojan backdoors.

The command netstat will show you which ports are currently used.


(1) I guess this means that the Web server application registered itself with the operating system, or perhaps more specifically with a TCP process, thus informing it that any traffic to the specified port should be sent to the Web server, which will process it.

(2) "Packet" is used for layer 3 (IP); at layer 4 (TCP or UDP) the equivalent word is "segment". It is a similar concept.
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform