Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. multiple client connection in VB6

multiple client connection in VB6

Scheduled Pinned Locked Moved Visual Basic
questiondatabasesysadminregex
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jainiraj
    wrote on last edited by
    #1

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

    L 1 Reply Last reply
    0
    • J jainiraj

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

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Try this one;

      Private Sub axWinsockListen_ConnectionRequest(ByVal requestID As Long)

      I wouldn't connect to many applications at once; VB6 wasn't built with multithreading support in mind.

      I are Troll :suss:

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups