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

  • SEARCH
  • Home
  • 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 390547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T15:58:30+00:00 2026-05-12T15:58:30+00:00

Is that possible? I’m writing a web-admin interface for a network-system. I need to

  • 0

Is that possible?

I’m writing a web-admin interface for a network-system. I need to listen to a specific UDP port and show it in browser. Can I do that in javascript?
Also; any other ideas are welcomed.

early-edit: Here’s another idea:
I have php and perl support at server-side. JS can call a php script to start listening, which will also call a perl script, which has an endless listener loop and collects the received messages into a sink variable. In theory; JS will be polling a PHP script every 2 seconds, get the sink variable and show it on browser/html.
But; how can a php script reach/read that sink variable? And, how or when will the perl script stop?
For the first part, using a file as a sink is a terrible idea; I’ll be receiving 10 string messages per second and also reading and then clearing file contents every 2 seconds. Not to mention the file lock mechanisms…
For the second part: i should put timeout somewhere but; where?

edit: Yes, I can choose where the listening will happen (server or client).

edit2: Why do I want to listen for UDP messages on a specific port and show it on browser:
The project I’m working on has some special sensors activated by some bussiness-specific-keys, these sensor devices are network-enabled and I have programmed them to send a UDP network broadcast message containing biz-key-info whenever they sense something.
There are lots of these devices on same network, and the web-admin interface should have a page where user can see what is happening in real-time or almost-real-time (~5 second delay is acceptable, that is why I had the poll-every-2seconds idea at my early-edit).

edit3: I have also found this: ActiveSocket which is an ActiveX component but; as predicted it didnt work on Firefox and has no documentation about it’s html+JS part.

  • 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-05-12T15:58:30+00:00Added an answer on May 12, 2026 at 3:58 pm

    The simpelst solution would be a Flash-Brigdem, since in Javascript there is no way to directly connect to a socket.

    I’ve done something like that some time ago you can download the full source here. You can run simpleserver.py(requires python3) and then access the index.htm via localhost, in order to test it.

    Also note, Flash’s security model wants an XML-Document on port 843, it will send

    <policy-file-request/>
    

    to the socket.
    You then should respond with something like:

    <?xml version="1.0"?><cross-domain-policy>
            <allow-access-from domain="*" to-ports="*" />
            </cross-domain-policy>
    

    If you don’t have anything running on Port 843 it will send the same request to the port you are trtying to connect to. But only after the 843 request has timed out.

    There are some other security “features”, but you can read about those in the Adobe docs.

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

Sidebar

Ask A Question

Stats

  • Questions 201k
  • Answers 201k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer C and all the many languages that copied from it… May 12, 2026 at 8:15 pm
  • Editorial Team
    Editorial Team added an answer When using Publish on a Windows application, you create a… May 12, 2026 at 8:15 pm
  • Editorial Team
    Editorial Team added an answer It is probably cleaner and less error prone to use… May 12, 2026 at 8:15 pm

Related Questions

I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
Is it possible to replace javascript w/ HTML if JavaScript is not enabled on
Is that possible? I mean, can both ends of the many to many relationship
I just start learning WPF, is that possible I can create an IE toolbar
I want to call a function using a variable. Is that possible in C?

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.