N
Nico
Hi,
Sorry for my english, this isn't my native language andI'll try to be as
clear as possible.
I'm new to VB .NET and must create a server-type app (almost the same
app. I programmed in VB 6 using Winsock controls a few years ago but I start
this new app. from scratch and want to be "up to date"). I looked at the
..Net framework classes and discovered the System.Net.Sockets and its
sub-classes. I found that TCPListener class seems to be the most adapted as
it contains every functionnality I need.
But, there is a thing I dont understand (or I just didn't found the
right explanation): Every examples I found over the internet using this
class (or every other server-type class derived from System.Net.Sockets)
uses an endless loop (pooling) that verify the buffer of the socket to see
if it has recieved something from the client. Where is gone the "event
listener" that was present with the Winsock control ???? Just imagine I
have over 1500 to 8000 connections at the same time,each of them using a
thread with an endless loop, it's almost certain that I will overload my
CPU!!! This app is built to be used on a single CPU system, it is not
designed to be used with a system that have 40 CPU
So, is there a way to set an event listener that will activate ONLY ON
DATA ARRIVAL, just like the Winsock control did and WITHOUT using an endless
loop to check if data was sent from the client ??? If yes, which class must
I use? And how do I implement it?
Thanks in advance !!
Nico
Sorry for my english, this isn't my native language andI'll try to be as
clear as possible.
I'm new to VB .NET and must create a server-type app (almost the same
app. I programmed in VB 6 using Winsock controls a few years ago but I start
this new app. from scratch and want to be "up to date"). I looked at the
..Net framework classes and discovered the System.Net.Sockets and its
sub-classes. I found that TCPListener class seems to be the most adapted as
it contains every functionnality I need.
But, there is a thing I dont understand (or I just didn't found the
right explanation): Every examples I found over the internet using this
class (or every other server-type class derived from System.Net.Sockets)
uses an endless loop (pooling) that verify the buffer of the socket to see
if it has recieved something from the client. Where is gone the "event
listener" that was present with the Winsock control ???? Just imagine I
have over 1500 to 8000 connections at the same time,each of them using a
thread with an endless loop, it's almost certain that I will overload my
CPU!!! This app is built to be used on a single CPU system, it is not
designed to be used with a system that have 40 CPU
So, is there a way to set an event listener that will activate ONLY ON
DATA ARRIVAL, just like the Winsock control did and WITHOUT using an endless
loop to check if data was sent from the client ??? If yes, which class must
I use? And how do I implement it?
Thanks in advance !!
Nico