multiple client connection in VB6
-
I am creating an application in which tcp server can connect to more than one tcp client. following is the code- where winsockServer is the winsock control in VB6 whose index property is set to 0. ---------------- Private Sub Form_Load() 'winsockServer.Protocol = sckTCPProtocol ' choose the TCP protocol winsockServer(0).LocalPort = 2020 ' an example port number winsockServer(0).Listen ' tell Winsock to start listening intSockCnt = 0 End Sub Private Sub winsockServer_ConnectionRequest(Index As Integer, ByVal requestID As Long) If intSockCnt > 2 Then MsgBox "No. of hosts exceed....." Else intSockCnt = intSockCnt + 1 Load winsockServer(intSockCnt) winsockServer(intSockCnt).Accept requestID End If End Sub on compiling it is giving an error- Procedure declaration does not match description of event or procedure having the same name How can I do this ?????? thanks in adv..
-
I am creating an application in which tcp server can connect to more than one tcp client. following is the code- where winsockServer is the winsock control in VB6 whose index property is set to 0. ---------------- Private Sub Form_Load() 'winsockServer.Protocol = sckTCPProtocol ' choose the TCP protocol winsockServer(0).LocalPort = 2020 ' an example port number winsockServer(0).Listen ' tell Winsock to start listening intSockCnt = 0 End Sub Private Sub winsockServer_ConnectionRequest(Index As Integer, ByVal requestID As Long) If intSockCnt > 2 Then MsgBox "No. of hosts exceed....." Else intSockCnt = intSockCnt + 1 Load winsockServer(intSockCnt) winsockServer(intSockCnt).Accept requestID End If End Sub on compiling it is giving an error- Procedure declaration does not match description of event or procedure having the same name How can I do this ?????? thanks in adv..