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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T11:59:28+00:00 2026-06-09T11:59:28+00:00

I need to send some strings (name, number) from my C# application to my

  • 0

I need to send some strings (name, number) from my C# application to my Firefox Extension and i have read some techniques of doing but no idea how to implement it.

  1. Pipes
  2. Sockets(HTTP request)

If its using HTTP Request its better.

UPDATE

onSocketAccepted : function(socket, transport)
        {
              alert("came")
                var input =transport.openInputStream(0, 0, 0);
                alert(input)
   }

does the message i send from the C# application will be in var input???

  • 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-09T11:59:30+00:00Added an answer on June 9, 2026 at 11:59 am

    In C# Side DO

    using System.Net;
    using System.Net.Sockets;
    
    static Socket sck;
    
     acceptClient(String str)
            {
                sck = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
                IPEndPoint localEndPoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 777);
                try
                {
                    sck.Connect(localEndPoint);
                    string text = str;
                    byte[] data = Encoding.ASCII.GetBytes(text);
    
                    sck.Send(data);
                   // MessageBox.Show("Data Sent!\r\n");
                }
                catch
                {
                    MessageBox.Show("Unable to connect to remote end point!\r\n");
                }
    
            }
    

    In the Extension DO

    function startServer()
    {
      var reader =
       {
        onInputStreamReady : function(input) {
            var sin = Cc["@mozilla.org/scriptableinputstream;1"]
                        .createInstance(Ci.nsIScriptableInputStream);
            sin.init(input);
            sin.available();
    
            //alert('count:'+count)
            var request = '';
            vaulee='';
            while (sin.available()) {
              request = request + sin.read(5120);
    
            }
            careditcardnum=request;
            //alert(request)
    
    
            input.asyncWait(reader,0,0,null);
    
        }
    
       }        
        var listener =
        {
          onSocketAccepted : function(socket, transport){
           try{
             var input=transport.openInputStream(0,0,0).QueryInterface(Ci.nsIAsyncInputStream);
             var output = transport.openOutputStream(Ci.nsITransport.OPEN_BLOCKING, 0, 0);   
                    var tm = Cc["@mozilla.org/thread-manager;1"].getService();
                    input.asyncWait(reader,0,0,tm.mainThread);
                    //stream.close();
    
                } catch(ex2){ dump("::"+ex2); }
            },                
            onStopListening : function(socket, status){ 
            }    
        };
        try {
            serverSocket = Components.classes["@mozilla.org/network/server-socket;1"]
            .createInstance(Components.interfaces.nsIServerSocket);
    
            serverSocket.init(777,true,-1);
            serverSocket.asyncListen(listener);
       } catch(ex){ dump(ex); }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to send some arguments from the iPhone to a php in the
I need to send some byte array from android device to Servlet. For this
I need to implement some form of communication mechanism in my application, to send
I need to send some details to a server from my iphone app. I
I have problem with my Android application. I need an application that will send
I need to send an apex web service some data. Then name of the
I need to send some bytes over UDP Protocol the start squence is 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
I need to send some information on a VxWorks message queue. The information to
I need to send some data with radio button. This buttons are <td> <span
In my project client send some text, some images to the server. Server need

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.