Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Give me your opinion please
Message
De
06/09/2005 15:17:12
Keith Payne
Technical Marketing Solutions
Floride, États-Unis
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01047123
Message ID:
01047135
Vues:
7
>I am working on an app that connects to a device using the TCP protocol. I send a data packet (containing a command), this is a relatively small data packet. Then the device that I am connected to will return a data packet (again relatively small packet up to 1K worth of data).
>I will connect to the device up to 250 times (send and receive data) then I will wait for about 1 minute (might be a longer wait. I think I will make the waiting period programmable from 30 seconds to 5 minutes) and do the same thing over again.
>
>Currently what I am doing is connecting to the IP endpoint (IP address and port) using TCP anding the command, then receiving the data then disconnecting. Then I connect, send, receive and disconnect again and so on and so forth.
>
>This is in my oppinion the correct way of doing this.
>
>The other option is to connect, then send command#1, receive, send command #2, receive, ....send command#250, receive and then disconnect
>
>Any thoughts on the issue? Has anyone created a class that does something similar? Which method would you choose?
>
>Thanks,
>Einar

The main issue I can think of is the possibility of losing the connection in transit. Does the device have any sort of rollback function? How does the device handle incomplete packets?

Also, how does the device handle packets received in the wrong order? Is it connected to a router or a switch? How long will the transmission take? How important is performace compared to reliability?

All of these questions will determine which way you should go. Developing the software will definitely be less complicated if each packet is a separate connection.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform