Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8317431
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:36:04+00:00 2026-06-08T21:36:04+00:00

I have a script that opens a port and allows socket communication between multiple

  • 0

I have a script that opens a port and allows socket communication between multiple connections (a simple flash chat-box). This script has had to take care of itself regarding how long to run for and when to close the port. My question is, in case this script gets caught in an infinite loop (or I otherwise lose control of it) what can I do to close the port?

To be clear on this, I am after a second php script that will force close the port the first script has opened (I can then put some check code into this script to stop executing if the socket has been closed).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T21:36:06+00:00Added an answer on June 8, 2026 at 9:36 pm

    I’m not aware of a way to do that. A socket exists within the instance it was created. If you create the socket and run the while(1) loop inside script “foo.php”, as far as I know, there’s no way for a separate execution of another script, say “bar.php” to access the socket created in foo.php and close it down. Typically, client-server applications rely on threading to achieve socket pooling and monitoring.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a dialog box that opens on pageload for a site. script type=text/javascript>
I have a simple flash socket that I use to connect to IRC servers.
I have a script that opens Powerpoint from my application and exports all slides.
I have a ruby script that opens a browser. I have it set to
I have a PHP script that opens an XML document, gets the DOM and
I currently have a small Python script that I'm using to spawn multiple executables,
I have a Windows shell script that opens an application. I'd like to modify
I have a date script that opens a dropdown when you click inside the
I have a Python script that opens a websocket to the Twitter API and
I have developed a C# script that opens an XLS file, parses it and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.