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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:58:40+00:00 2026-05-26T18:58:40+00:00

I am using chilkat socket class. The problem is I want to keep my

  • 0

I am using chilkat socket class. The problem is I want to keep my socket open, lets say I executed my form and the very first time which opened the port on a specific IP to listen the messages.I am able to receive the messages first time only successfully, now after this message I want to keep my application to keep listening and receive when ever a new message comes.

We have several clients who will connect and send some text messages on the same port and ip.

But I am unable to achieve this. I need to build a Listener, which will keep on listening and as soon as I will get any message I need to process it. Any body who has used chilkat class or having experience in this kind of application kindly suggest me how can I achieve this functionality as I could’t find good example for this kind of application on CHILKAT website or may be I am inexperienced don’t know how to exactly code this type of functionality.

Edit 1: Jermy,

yes we have developed REST WCF services and they are working perfect, but the problem is in the response of REST WCF Service big response headers are appearing, which we don’t want because in our enterprise application Windows Phone 7 mobiles will also communicate and send text messages and only for the sake of mobiles we are trying to reduce the data we need to pass back and by using sockets we can avoid extra response headers and SMS is not an option for us because of cost. If you have any suggestions towards Webservices to minimize the data kindly share it.

  • 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-26T18:58:40+00:00Added an answer on May 26, 2026 at 6:58 pm

    Have you considered a Web Service? They can be consumed by pretty much any language that can send Http requests. If you have control of the client applications then a Web Service is definitely the correct route.

    http://sarangasl.blogspot.com/2010/09/create-simple-web-service-in-visual.html

    Edit:

    Have you considered simple http upload of bytes, with a http response code. Ie Http Ok, Http Failure. You can customize the status codes to anything that suits your project.

    Edit 2:

    Perhaps an RPC styled method with ONLY http status codes as the response could be suitable. Checks this question for hints. json call with C#

    Basically you are just sending some string to a url, then receiving the status code back. That is quite minimal.

    Edit 3:

    Here is something I pulled out of some old code with Reflector. This is just for the general gist of the procedure. Obviously there should be a using statement on the first request.

    public void SMS(Uri address, string data)
    {
    
       // Perhaps string data is JSON, or perhaps its something delimited who knows.
       // Json seems to be the pretty lean.
        try
        {
            HttpWebRequest request = (HttpWebRequest) WebRequest.Create(address);
            request.Method = "POST";
            // If we don't setup proxy information then IE has to resolve its current settings
            // and adds 500+ms to the request time.
            request.Proxy = new WebProxy();
            request.Proxy.IsBypassed(address);
            request.ContentType = "application/json;charset=utf-8";
            // If your only sending two bits of data why not add custom headers?
            // If you only send headers, no need for the StreamWriter.
            // request.Headers.Add("SMS-Sender","234234223");
            // request.Headers.Add("SMS-Body","Hey mom I'm keen for dinner tonight :D");
            request.Headers.Add("X-Requested-With", "XMLHttpRequest");
            StreamWriter writer = new StreamWriter(request.GetRequestStream());
            writer.WriteLine(data);
            writer.Close();
            using (HttpWebResponse response = (HttpWebResponse) request.GetResponse())
            {
                using (Stream stream = response.GetResponseStream())
                {
                    // Either read the stream or get the status code and description.
                    // Perhaps you won't even bother reading the response stream or the code 
                    // and assume success if no HTTP error status causes an exception.
                }
            }
        }
        catch (WebException exception)
        {
            if (exception.Status == WebExceptionStatus.ProtocolError)
            {
                // Something,perhaps a HTTP error is used for a failed SMS?
            }
        }
    }
    

    Remember to respond only with Http status codes and descriptions. And ensure that the request’s proxy is setup to bypass the requesting Url to save time resolving the IE proxy.

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

Sidebar

Related Questions

Using Django, how do I generate the value of a field the first time
Using ASP.NET MVC there are situations (such as form submission) that may require a
Using C#, I need a class called User that has a username, password, active
Does anyone know how to show the progress of archives extracting, when using chilkat?
Using android 2.3.3, I have a background Service which has a socket connection. There's
Using WPF/PRISM I want to log my messages through ILoggerFacade to my GUI (A
I am uploading file to mainframe and before uploading when I open it using
I am using Chilkat FTP component to download some files from an FTP Server
Using CRM 4, I have an entity form that contains a tab with an
Using VB6 I am using checkbox and combobox in a Form. When i click

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.