lassad_haddaji
Messages postés141Date d'inscriptionmardi 24 avril 2007StatutMembreDernière intervention 6 avril 2012 14 déc. 2008 à 13:37
manque de commentaire
demidali
Messages postés4Date d'inscriptionjeudi 20 novembre 2003StatutMembreDernière intervention 7 octobre 2005 9 févr. 2005 à 22:49
Bonjour !
J'utilise les mêmes outils que vous pour avoir un service Windows qui écoute sur un port XXX. Ce service écoute sur un serveur Windows 2000. J'ai une application qui parle à ce service. La ligne de code networkstream.read(byte,0,...) retourne seulement le premier caractère de la chaine envoyé au service. Si je met le service sur un PC Windows XP, la string est complète sans changer aucune ligne de code ...
Pouvez-vous m'aider ou me référer. Je cherche depuis 2 semaines, je suis pas mal désespéré ...
Merci !
cs_mahhoura
Messages postés15Date d'inscriptionvendredi 23 janvier 2004StatutMembreDernière intervention25 août 2007 23 janv. 2004 à 16:08
Bonjour Monsieur il y a une Classe TCPListner qui fait tout ce boulot reste a organiser le travail de sockets en les insérant dans un arrayList par exemple et de cette façon ton prog pourra gérer un nombre assez géant de connexions
cs_zappy
Messages postés161Date d'inscriptionmardi 19 juin 2001StatutMembreDernière intervention10 avril 20072 6 mars 2003 à 08:11
Pas tout à fait.
cs_RayBan
Messages postés17Date d'inscriptionjeudi 24 janvier 2002StatutMembreDernière intervention 9 juin 2004 5 mars 2003 à 20:51
Hi,
I am not sure, but there a TCPListener class in .Net, that do all the thing your code do...
cs_zappy
Messages postés161Date d'inscriptionmardi 19 juin 2001StatutMembreDernière intervention10 avril 20072 12 déc. 2002 à 11:51
Bodekaer
Messages postés3Date d'inscriptionlundi 9 décembre 2002StatutMembreDernière intervention12 décembre 2002 12 déc. 2002 à 11:45
No problem, my french isn't that good either :)
Well, I was wondering if you had a good example of hw to use asynchronous sockets in VB.NET
My program will normally handle between 30-90 connections at the same time.
/Michael
cs_zappy
Messages postés161Date d'inscriptionmardi 19 juin 2001StatutMembreDernière intervention10 avril 20072 9 déc. 2002 à 11:31
Hi bodekaer,
I'm sorry, now i'm coding in C# and not in VB.NET.
You can use asynchronous sockets for betters performances without multi-threading (one thread / session is not good for a lot connections).
I have tested this code on my win2k : works with 5 connections without problem.
Happy coding !
ps: Sorry for my bad english :)
Bodekaer
Messages postés3Date d'inscriptionlundi 9 décembre 2002StatutMembreDernière intervention12 décembre 2002 9 déc. 2002 à 11:19
Hi,
I am currently using your code in a VB.NET app I have created.
But when ever a thread is runinng, the loop that checks for new messages, uses a lot of CPU.
I actually thought that the Application.Doevents, would prevent the code from using a lot of CPU. But it doesn't.
I am sure it although wont affect the performance of other programs, but it looks "wild" the my program looks like it is using 100% of the CPU (and I am using a 2.5 Ghz machine :)
14 déc. 2008 à 13:37
9 févr. 2005 à 22:49
J'utilise les mêmes outils que vous pour avoir un service Windows qui écoute sur un port XXX. Ce service écoute sur un serveur Windows 2000. J'ai une application qui parle à ce service. La ligne de code networkstream.read(byte,0,...) retourne seulement le premier caractère de la chaine envoyé au service. Si je met le service sur un PC Windows XP, la string est complète sans changer aucune ligne de code ...
Pouvez-vous m'aider ou me référer. Je cherche depuis 2 semaines, je suis pas mal désespéré ...
Merci !
23 janv. 2004 à 16:08
6 mars 2003 à 08:11
5 mars 2003 à 20:51
I am not sure, but there a TCPListener class in .Net, that do all the thing your code do...
12 déc. 2002 à 11:51
But i have a good link for C# programming sockets in a non-blocking mode.
http://www.codeproject.com/csharp/socketsincs.asp
Happy coding !
12 déc. 2002 à 11:45
Well, I was wondering if you had a good example of hw to use asynchronous sockets in VB.NET
My program will normally handle between 30-90 connections at the same time.
/Michael
9 déc. 2002 à 11:31
I'm sorry, now i'm coding in C# and not in VB.NET.
You can use asynchronous sockets for betters performances without multi-threading (one thread / session is not good for a lot connections).
I have tested this code on my win2k : works with 5 connections without problem.
Happy coding !
ps: Sorry for my bad english :)
9 déc. 2002 à 11:19
I am currently using your code in a VB.NET app I have created.
But when ever a thread is runinng, the loop that checks for new messages, uses a lot of CPU.
I actually thought that the Application.Doevents, would prevent the code from using a lot of CPU. But it doesn't.
I am sure it although wont affect the performance of other programs, but it looks "wild" the my program looks like it is using 100% of the CPU (and I am using a 2.5 Ghz machine :)
Is there anything to do to prevent this ?
/Michael