TIP: Click on subject to list as thread! ANSI
echo: visual_basic
to: All
from: `michael D. Ober` obermd
date: 2005-02-08 02:47:00
subject: Re: winsock.EDU.NOSPAM

Also be careful of unloading winsockets from the control array.  First,
ensure you're running VB 6 SP5 - earlier version had a memory leak, and also
only unload from the highest numbered control array socket as it is
undefined what will happen if you unload from the middle of a control array.

If you know how many sockets you want, you might want to preallocate the
control array.  Also, remember that VB6 is single threaded and you need to
keep the socket data processing a short as possible.

Mike Ober.

"mickey"  wrote in message
news:v5ef01p6mqmjit233ltf9i6m2dknjsn7mb{at}4ax.com...
> On Mon, 7 Feb 2005 10:06:07 +0200, "Παππας Κωνσταντίνος"
>  you typed some letters in random order:
>
> >Dear Group,
> >
> >i would like to explain me if you could how i cold make a server in
visual
> >basic with multiplt sockets. I use the included winsock compoment. I
would
> >like to load about 100 free socket. Any ideas?
> >
>
> Create a winsock control on jour form. select it. Then crtl-C (copy).
> After that paste it (crtl-v). Vb will ask you if you like to create a
> control array. click Yes. After that delete the new winsock control.
>
> Now you have a control array called 'winsock(0)'
>
> MSDN: (Note: sckserver(0) = winsock(0) )
> Private Sub Form_Load()
>    intMax = 0
>    sckServer(0).LocalPort = 1001
>    sckServer(0).Listen
> End Sub
>
>
> Private Sub sckServer_ConnectionRequest _
> (Index As Integer, ByVal requestID As Long)
>    If Index = 0 Then
>       intMax = intMax + 1
>       Load sckServer(intMax)
>       sckServer(intMax).LocalPort = 0
>       sckServer(intMax).Accept requestID
>       Load txtData(intMax)
>    End If
> End Sub
>
> Groetjenz,
>
> Mickey
> --
> #### gewoan skrieve su ast ut seist ####
>





--- UseNet To RIME Gateway {at} 2/8/05 2:36:16 AM ---
* Origin: MoonDog BBS, Brooklyn,NY, 718 692-2498, 1:278/230 (1:278/230)
SEEN-BY: 633/267 270 5030/786
@PATH: 278/230 10/345 106/1 2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.