pass socket resource to second script (socket connections)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ratcateme
    New Member
    • Nov 2007
    • 11

    pass socket resource to second script (socket connections)

    i want to create a php script that will listen and accept connections on a port then pass the connection onto another script to keep the main script just handling incoming connections and not being tied up until the connection ends.
    i have made a script that listens on port 9000 and waits until a connection is received then it will do stuff. the only problem with this is that it can only have on connection at a time and i need multiple connections at the same time.

    Scott.
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    Look at the following sample from the PHP manual socket_select function() entry about this. Link to manage multiple connections in PHP Hope that helps you along.

    Ronald

    Comment

    • ratcateme
      New Member
      • Nov 2007
      • 11

      #3
      Thanks that looks like just what i want.

      Scott.

      Comment

      • ronverdonk
        Recognized Expert Specialist
        • Jul 2006
        • 4259

        #4
        You are welcome. See you next time around.

        Ronald

        Comment

        • ratcateme
          New Member
          • Nov 2007
          • 11

          #5
          since i got that working i was trying to convert the normal socket to a SSL socket so connections to it will be encrypted does anyone have any ideas about how to go about doing this or is it just not possiable.

          Scott.

          Comment

          Working...