For Programmers: Free Programming Magazines  


Home > Archive > Visual Basic Syntax > February 2005 > winsock









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author winsock
Παππας Κωνσταντίνος

2005-02-08, 4:01 am

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?


Gaurav - http://www.gauravcreations.com

2005-02-10, 4:01 pm

Private Sub Form_Load()
On Error GoTo ClassHandler1
ClassHandler1:
If Err.Number = 10049 Then
Response1 = MsgBox("IP Address Not Avaliable", , "")
End If
Resume Next
intMax = 0
Winsock1(intMax).LocalPort = 6050
Winsock1(intMax).Listen

End Sub

Private Sub Winsock1_ConnectionRequest(Index As Integer, ByVal requestID As
Long)
If Index = 0 Then
intMax = intMax + 1
Load Winsock1(intMax)
Winsock1(intMax).LocalPort = 6050
Winsock1(intMax).Accept requestID
End If
End Sub

u can use the above code

--
Gaurav Creations
"ÐÑððÑò ÊùΓ_óôÑΓ_ôßΓ_Γ―Γ²" wrote:

> 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?
>
>
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com