TIP: Click on subject to list as thread! ANSI
echo: visual_basic
to: All
from: Mickey mickeyatgruizelgr
date: 2005-02-07 18:46:00
subject: Re: winsock

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/7/05 6:34:42 PM ---
* 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™.