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 6057471
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:29:32+00:00 2026-05-23T08:29:32+00:00

So, for sending to individual streams we have to reference the connected netStream we

  • 0

So, for sending to individual streams we have to reference the connected netStream we want to send to in some way like this:

sendStream.peerStreams[0].send("MyFunction",param1,param2);

and I have to determine which peer I’m sending to by their ID such as “peerID1234”

I know that you can check the peerID of the stream by doing:

sendStream.peerStreams[0]["farID"]

how can I make my send stream function know to use the array index where the peerID is?

so basically it could be like:

sendStream.peerStreams[where peerStreams[]["farID"] == peerID].send("MyFunction",param1,param2);
  • 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-23T08:29:33+00:00Added an answer on May 23, 2026 at 8:29 am

    Sounds like you’ll have to loop through the peerStreams array to find the object that has the right farID property value. Basically you are searching through the array for an item with a specific property value. There is no built-in functionality for this. But you can do it with a simple loop. Something like this:

    var correctStream:Object = null;
    for each (var stream:Object in sendStream.peerStreams) {
       if (stream["farId"] == peerId) {
         correctStream = stream;
         break;
       }
    }
    correctStream.send("MyFunction",param1,param2);
    

    Note that I don’t know what the data type is for the peerStreams object so I just typed it as Object in my example.

    There’s some other approaches mentioned here but they are just different styles of doing the same thing.

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

Sidebar

Related Questions

I'm attempting to send an email and instead of sending 5 individual emails to
I have the following data which I want to save in my DB (this
I have several vehicles equiped each with individual GPS tracker sending NMEA stream to
sending mail along with embedded image using asp.net I have already used following but
I have been using https://github.com/Redth/APNS-Sharp to send push notification message to all devices where
My issue is this that I am trying to make use of email sending
This is in regard to Objective-C in an iPhone app... I have figured out
I want to send out batch mails using SwiftMailer but just wondering what the
SqlBulkCopy is supposed to help do large volume of inserts instead of sending individual
I have a problem with sending an array using socket.io. The client creates an

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.