Winsock:1server Multiple Clients


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 11 of 11

Thread: Winsock:1server Multiple Clients

  1. #1
    FELIX Guest

    Winsock:1server Multiple Clients


    Hi all,
    How can I design a 1 server Multiple Clients Winsock application. I have
    found numerous examples on 1 server 1 Clients.

    Thanks for your help in advance.
    Felix



  2. #2
    Dean Earley Guest

    Re: Winsock:1server Multiple Clients

    You need to have a control array of the Socket controls.
    I believe there is a request event or something similar.
    in that event create a new instance of the socket control, then call the accept method of the new control.

    Your server should now accept multiple requests.

    I hope this helps.

    --
    Dean Earley (dean.earley@icode.co.uk)
    Assistant Developer

    iCode Systems
    "FELIX" <felix5ac@southerninfoservices.com> wrote in message news:3ae05931$1@news.devx.com...
    >
    > Hi all,
    > How can I design a 1 server Multiple Clients Winsock application. I have
    > found numerous examples on 1 server 1 Clients.
    >
    > Thanks for your help in advance.
    > Felix
    >
    >




  3. #3
    Dean Earley Guest

    Re: Winsock:1server Multiple Clients

    You need to have a control array of the Socket controls.
    I believe there is a request event or something similar.
    in that event create a new instance of the socket control, then call the accept method of the new control.

    Your server should now accept multiple requests.

    I hope this helps.

    --
    Dean Earley (dean.earley@icode.co.uk)
    Assistant Developer

    iCode Systems
    "FELIX" <felix5ac@southerninfoservices.com> wrote in message news:3ae05931$1@news.devx.com...
    >
    > Hi all,
    > How can I design a 1 server Multiple Clients Winsock application. I have
    > found numerous examples on 1 server 1 Clients.
    >
    > Thanks for your help in advance.
    > Felix
    >
    >




  4. #4
    Monte Hansen Guest

    Re: Winsock:1server Multiple Clients


    You might want to keep in mind that the Winsock control was not intended for
    heavy use as a server side listener. As long as it doesn't need to scale
    very well, the control will do fine, that is, if you can get past the smell
    of that whole "control array" thing. You could point to the control as a
    "reference" vs. a "control" but that has it's problems too.

    Monte Hansen
    http://KillerVB.com


    "Dean Earley" <dean.earley@icode.co.uk> wrote:
    >You need to have a control array of the Socket controls.
    >I believe there is a request event or something similar.
    >in that event create a new instance of the socket control, then call the

    accept method
    >of the new control.
    >
    >Your server should now accept multiple requests.
    >
    >I hope this helps.
    >
    >--
    >Dean Earley (dean.earley@icode.co.uk)
    >Assistant Developer
    >
    >iCode Systems
    >"FELIX" <felix5ac@southerninfoservices.com> wrote in message news:3ae05931$1@news.devx.com...
    >>
    >> Hi all,
    >> How can I design a 1 server Multiple Clients Winsock application. I have
    >> found numerous examples on 1 server 1 Clients.
    >>
    >> Thanks for your help in advance.
    >> Felix
    >>
    >>

    >
    >



  5. #5
    Monte Hansen Guest

    Re: Winsock:1server Multiple Clients


    You might want to keep in mind that the Winsock control was not intended for
    heavy use as a server side listener. As long as it doesn't need to scale
    very well, the control will do fine, that is, if you can get past the smell
    of that whole "control array" thing. You could point to the control as a
    "reference" vs. a "control" but that has it's problems too.

    Monte Hansen
    http://KillerVB.com


    "Dean Earley" <dean.earley@icode.co.uk> wrote:
    >You need to have a control array of the Socket controls.
    >I believe there is a request event or something similar.
    >in that event create a new instance of the socket control, then call the

    accept method
    >of the new control.
    >
    >Your server should now accept multiple requests.
    >
    >I hope this helps.
    >
    >--
    >Dean Earley (dean.earley@icode.co.uk)
    >Assistant Developer
    >
    >iCode Systems
    >"FELIX" <felix5ac@southerninfoservices.com> wrote in message news:3ae05931$1@news.devx.com...
    >>
    >> Hi all,
    >> How can I design a 1 server Multiple Clients Winsock application. I have
    >> found numerous examples on 1 server 1 Clients.
    >>
    >> Thanks for your help in advance.
    >> Felix
    >>
    >>

    >
    >



  6. #6
    Dean Earley Guest

    Re: Winsock:1server Multiple Clients

    What do you mean?
    Dim Socket() as winsock.socket instead of dropping a control on the form

    --
    Dean Earley (dean.earley@icode.co.uk)
    Assistant Developer

    iCode Systems
    "Monte Hansen" <monte@nospam.com> wrote in message news:3ae0ba69$1@news.devx.com...
    >
    > You might want to keep in mind that the Winsock control was not intended for
    > heavy use as a server side listener. As long as it doesn't need to scale
    > very well, the control will do fine, that is, if you can get past the smell
    > of that whole "control array" thing. You could point to the control as a
    > "reference" vs. a "control" but that has it's problems too.
    >
    > Monte Hansen
    > http://KillerVB.com
    >
    >
    > "Dean Earley" <dean.earley@icode.co.uk> wrote:
    > >You need to have a control array of the Socket controls.
    > >I believe there is a request event or something similar.
    > >in that event create a new instance of the socket control, then call the

    > accept method
    > >of the new control.
    > >
    > >Your server should now accept multiple requests.
    > >
    > >I hope this helps.
    > >
    > >--
    > >Dean Earley (dean.earley@icode.co.uk)
    > >Assistant Developer
    > >
    > >iCode Systems
    > >"FELIX" <felix5ac@southerninfoservices.com> wrote in message news:3ae05931$1@news.devx.com...
    > >>
    > >> Hi all,
    > >> How can I design a 1 server Multiple Clients Winsock application. I have
    > >> found numerous examples on 1 server 1 Clients.
    > >>
    > >> Thanks for your help in advance.
    > >> Felix
    > >>
    > >>

    > >
    > >

    >




  7. #7
    Dean Earley Guest

    Re: Winsock:1server Multiple Clients

    What do you mean?
    Dim Socket() as winsock.socket instead of dropping a control on the form

    --
    Dean Earley (dean.earley@icode.co.uk)
    Assistant Developer

    iCode Systems
    "Monte Hansen" <monte@nospam.com> wrote in message news:3ae0ba69$1@news.devx.com...
    >
    > You might want to keep in mind that the Winsock control was not intended for
    > heavy use as a server side listener. As long as it doesn't need to scale
    > very well, the control will do fine, that is, if you can get past the smell
    > of that whole "control array" thing. You could point to the control as a
    > "reference" vs. a "control" but that has it's problems too.
    >
    > Monte Hansen
    > http://KillerVB.com
    >
    >
    > "Dean Earley" <dean.earley@icode.co.uk> wrote:
    > >You need to have a control array of the Socket controls.
    > >I believe there is a request event or something similar.
    > >in that event create a new instance of the socket control, then call the

    > accept method
    > >of the new control.
    > >
    > >Your server should now accept multiple requests.
    > >
    > >I hope this helps.
    > >
    > >--
    > >Dean Earley (dean.earley@icode.co.uk)
    > >Assistant Developer
    > >
    > >iCode Systems
    > >"FELIX" <felix5ac@southerninfoservices.com> wrote in message news:3ae05931$1@news.devx.com...
    > >>
    > >> Hi all,
    > >> How can I design a 1 server Multiple Clients Winsock application. I have
    > >> found numerous examples on 1 server 1 Clients.
    > >>
    > >> Thanks for your help in advance.
    > >> Felix
    > >>
    > >>

    > >
    > >

    >




  8. #8
    Monte Hansen Guest

    Re: Winsock:1server Multiple Clients


    Yes, you can point to the Winsock control as a reference and "DIM" it. Problem
    is, due to a bug, you cannot remove the reference without removing it from
    the VBP project file manually using a text editor. Even more puzzling, I
    encountered many cases in production where the DIM approach would bomb, where
    it would not otherwise bomb using the control. Go figure!

    I finally gave the control the boot and hand-rolled my own library <g>.

    Monte Hansen
    KillerVB.com


    "Dean Earley" <dean.earley@icode.co.uk> wrote:
    >What do you mean?
    >Dim Socket() as winsock.socket instead of dropping a control on the form
    >
    >--
    >Dean Earley (dean.earley@icode.co.uk)
    >Assistant Developer
    >
    >iCode Systems
    >"Monte Hansen" <monte@nospam.com> wrote in message news:3ae0ba69$1@news.devx.com...
    >>
    >> You might want to keep in mind that the Winsock control was not intended

    for
    >> heavy use as a server side listener. As long as it doesn't need to scale
    >> very well, the control will do fine, that is, if you can get past the

    smell
    >> of that whole "control array" thing. You could point to the control as

    a
    >> "reference" vs. a "control" but that has it's problems too.
    >>
    >> Monte Hansen
    >> http://KillerVB.com
    >>
    >>
    >> "Dean Earley" <dean.earley@icode.co.uk> wrote:
    >> >You need to have a control array of the Socket controls.
    >> >I believe there is a request event or something similar.
    >> >in that event create a new instance of the socket control, then call

    the
    >> accept method
    >> >of the new control.
    >> >
    >> >Your server should now accept multiple requests.
    >> >
    >> >I hope this helps.
    >> >
    >> >--
    >> >Dean Earley (dean.earley@icode.co.uk)
    >> >Assistant Developer
    >> >
    >> >iCode Systems
    >> >"FELIX" <felix5ac@southerninfoservices.com> wrote in message news:3ae05931$1@news.devx.com...
    >> >>
    >> >> Hi all,
    >> >> How can I design a 1 server Multiple Clients Winsock application.

    I have
    >> >> found numerous examples on 1 server 1 Clients.
    >> >>
    >> >> Thanks for your help in advance.
    >> >> Felix
    >> >>
    >> >>
    >> >
    >> >

    >>

    >
    >



  9. #9
    Monte Hansen Guest

    Re: Winsock:1server Multiple Clients


    Yes, you can point to the Winsock control as a reference and "DIM" it. Problem
    is, due to a bug, you cannot remove the reference without removing it from
    the VBP project file manually using a text editor. Even more puzzling, I
    encountered many cases in production where the DIM approach would bomb, where
    it would not otherwise bomb using the control. Go figure!

    I finally gave the control the boot and hand-rolled my own library <g>.

    Monte Hansen
    KillerVB.com


    "Dean Earley" <dean.earley@icode.co.uk> wrote:
    >What do you mean?
    >Dim Socket() as winsock.socket instead of dropping a control on the form
    >
    >--
    >Dean Earley (dean.earley@icode.co.uk)
    >Assistant Developer
    >
    >iCode Systems
    >"Monte Hansen" <monte@nospam.com> wrote in message news:3ae0ba69$1@news.devx.com...
    >>
    >> You might want to keep in mind that the Winsock control was not intended

    for
    >> heavy use as a server side listener. As long as it doesn't need to scale
    >> very well, the control will do fine, that is, if you can get past the

    smell
    >> of that whole "control array" thing. You could point to the control as

    a
    >> "reference" vs. a "control" but that has it's problems too.
    >>
    >> Monte Hansen
    >> http://KillerVB.com
    >>
    >>
    >> "Dean Earley" <dean.earley@icode.co.uk> wrote:
    >> >You need to have a control array of the Socket controls.
    >> >I believe there is a request event or something similar.
    >> >in that event create a new instance of the socket control, then call

    the
    >> accept method
    >> >of the new control.
    >> >
    >> >Your server should now accept multiple requests.
    >> >
    >> >I hope this helps.
    >> >
    >> >--
    >> >Dean Earley (dean.earley@icode.co.uk)
    >> >Assistant Developer
    >> >
    >> >iCode Systems
    >> >"FELIX" <felix5ac@southerninfoservices.com> wrote in message news:3ae05931$1@news.devx.com...
    >> >>
    >> >> Hi all,
    >> >> How can I design a 1 server Multiple Clients Winsock application.

    I have
    >> >> found numerous examples on 1 server 1 Clients.
    >> >>
    >> >> Thanks for your help in advance.
    >> >> Felix
    >> >>
    >> >>
    >> >
    >> >

    >>

    >
    >



  10. #10
    Dean Earley Guest

    Re: Winsock:1server Multiple Clients

    I personally use Catalyst socketwrench, but I use the 'control on form' approach for servers.

    --
    Dean Earley (dean.earley@icode.co.uk)
    Assistant Developer

    iCode Systems
    "Monte Hansen" <monte@nospam.com> wrote in message news:3ae35f8f$1@news.devx.com...
    >
    > Yes, you can point to the Winsock control as a reference and "DIM" it. Problem
    > is, due to a bug, you cannot remove the reference without removing it from
    > the VBP project file manually using a text editor. Even more puzzling, I
    > encountered many cases in production where the DIM approach would bomb, where
    > it would not otherwise bomb using the control. Go figure!
    >
    > I finally gave the control the boot and hand-rolled my own library <g>.
    >
    > Monte Hansen
    > KillerVB.com
    >
    >
    > "Dean Earley" <dean.earley@icode.co.uk> wrote:
    > >What do you mean?
    > >Dim Socket() as winsock.socket instead of dropping a control on the form
    > >
    > >--
    > >Dean Earley (dean.earley@icode.co.uk)
    > >Assistant Developer
    > >
    > >iCode Systems
    > >"Monte Hansen" <monte@nospam.com> wrote in message news:3ae0ba69$1@news.devx.com...
    > >>
    > >> You might want to keep in mind that the Winsock control was not intended

    > for
    > >> heavy use as a server side listener. As long as it doesn't need to scale
    > >> very well, the control will do fine, that is, if you can get past the

    > smell
    > >> of that whole "control array" thing. You could point to the control as

    > a
    > >> "reference" vs. a "control" but that has it's problems too.
    > >>
    > >> Monte Hansen
    > >> http://KillerVB.com
    > >>
    > >>
    > >> "Dean Earley" <dean.earley@icode.co.uk> wrote:
    > >> >You need to have a control array of the Socket controls.
    > >> >I believe there is a request event or something similar.
    > >> >in that event create a new instance of the socket control, then call

    > the
    > >> accept method
    > >> >of the new control.
    > >> >
    > >> >Your server should now accept multiple requests.
    > >> >
    > >> >I hope this helps.
    > >> >
    > >> >--
    > >> >Dean Earley (dean.earley@icode.co.uk)
    > >> >Assistant Developer
    > >> >
    > >> >iCode Systems
    > >> >"FELIX" <felix5ac@southerninfoservices.com> wrote in message news:3ae05931$1@news.devx.com...
    > >> >>
    > >> >> Hi all,
    > >> >> How can I design a 1 server Multiple Clients Winsock application.

    > I have
    > >> >> found numerous examples on 1 server 1 Clients.
    > >> >>
    > >> >> Thanks for your help in advance.
    > >> >> Felix
    > >> >>
    > >> >>
    > >> >
    > >> >
    > >>

    > >
    > >

    >




  11. #11
    Dean Earley Guest

    Re: Winsock:1server Multiple Clients

    I personally use Catalyst socketwrench, but I use the 'control on form' approach for servers.

    --
    Dean Earley (dean.earley@icode.co.uk)
    Assistant Developer

    iCode Systems
    "Monte Hansen" <monte@nospam.com> wrote in message news:3ae35f8f$1@news.devx.com...
    >
    > Yes, you can point to the Winsock control as a reference and "DIM" it. Problem
    > is, due to a bug, you cannot remove the reference without removing it from
    > the VBP project file manually using a text editor. Even more puzzling, I
    > encountered many cases in production where the DIM approach would bomb, where
    > it would not otherwise bomb using the control. Go figure!
    >
    > I finally gave the control the boot and hand-rolled my own library <g>.
    >
    > Monte Hansen
    > KillerVB.com
    >
    >
    > "Dean Earley" <dean.earley@icode.co.uk> wrote:
    > >What do you mean?
    > >Dim Socket() as winsock.socket instead of dropping a control on the form
    > >
    > >--
    > >Dean Earley (dean.earley@icode.co.uk)
    > >Assistant Developer
    > >
    > >iCode Systems
    > >"Monte Hansen" <monte@nospam.com> wrote in message news:3ae0ba69$1@news.devx.com...
    > >>
    > >> You might want to keep in mind that the Winsock control was not intended

    > for
    > >> heavy use as a server side listener. As long as it doesn't need to scale
    > >> very well, the control will do fine, that is, if you can get past the

    > smell
    > >> of that whole "control array" thing. You could point to the control as

    > a
    > >> "reference" vs. a "control" but that has it's problems too.
    > >>
    > >> Monte Hansen
    > >> http://KillerVB.com
    > >>
    > >>
    > >> "Dean Earley" <dean.earley@icode.co.uk> wrote:
    > >> >You need to have a control array of the Socket controls.
    > >> >I believe there is a request event or something similar.
    > >> >in that event create a new instance of the socket control, then call

    > the
    > >> accept method
    > >> >of the new control.
    > >> >
    > >> >Your server should now accept multiple requests.
    > >> >
    > >> >I hope this helps.
    > >> >
    > >> >--
    > >> >Dean Earley (dean.earley@icode.co.uk)
    > >> >Assistant Developer
    > >> >
    > >> >iCode Systems
    > >> >"FELIX" <felix5ac@southerninfoservices.com> wrote in message news:3ae05931$1@news.devx.com...
    > >> >>
    > >> >> Hi all,
    > >> >> How can I design a 1 server Multiple Clients Winsock application.

    > I have
    > >> >> found numerous examples on 1 server 1 Clients.
    > >> >>
    > >> >> Thanks for your help in advance.
    > >> >> Felix
    > >> >>
    > >> >>
    > >> >
    > >> >
    > >>

    > >
    > >

    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center