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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:36:09+00:00 2026-05-25T13:36:09+00:00

I want both the client and server to write and read resp. at a

  • 0

I want both the client and server to write and read resp. at a constant rate (which can be configured on the GUI of the client) to the buffer.

Say,

  1. I am able to send from the client at 150 bytes per packet
  2. Now, I should be able to read also at 150 bytes per packet on the server too

Since, both are connected through a socket, can we retrieve the socket params (set on the client size, like 150 here) from the server end, using the tcpServer object.

Or is it must to send an initial setup packet which tells about these client params and so accordingly the server can continue?

  • 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-25T13:36:10+00:00Added an answer on May 25, 2026 at 1:36 pm

    It’s kinda usual to sort message sizes out at the application level. You could indeed send a ‘setup message’ as the first data after a successful connect. You should send this setup message in a form that will not be misunderstood due to endianness or the number of bytes received per read call. Perhaps a fixed-size messge in ASCII, maybe five bytes:

    ‘00150’

    The server can then read five bytes only, convert to integer, save it in the server-client socket object so that the server always knows how many bytes to send and then issue a read call for that number of bytes.

    Alternatively, you could use a simple protocol that embeds the size into each message, eg:

    SOH
    “0”
    “0”
    “1”
    “5”
    “0”
    [150 bytes of data]
    EOT

    Rgds,
    Martin

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

Sidebar

Related Questions

I have two simple programmes, server and client, both at localhost. What I want
I want to write a Simple P2P RDP Client and Server in Python. This
I want to read both formatted text and binary data from the same iostream.
I want to use both ContextLoaderListener (so that I can pass Spring Beans to
I have an ASP.NET MVC-application which I want deployable on both IIS6 and IIS7
For the ASP.NET validator controls, I want to use both client-side validation for the
I'm familiar with web programming, both client and server side, and I'd like to
In my case I want to write an app which is totally symetrical (not
i want to develop a pretty basic client-server program. one software reads xml (or
I want to write a class which provides basically a list of entries. This

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.