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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:39:20+00:00 2026-05-22T17:39:20+00:00

My client will communicate with clients using a struct/class called annoucement. I suppose I

  • 0

My client will communicate with clients using a struct/class called annoucement. I suppose I will write the server in C++. There will be many different classes that inherit annoucement. My problem is to send these classes over network to a client

I thought maybe I should use iovec. However I don’t know if there is anything corresponding to iovec in C#.

The idea is:
I would send a struct with writev, a client would use readv and read the data from the socket like it would be an annoucement class, check uint16 variable in the received struct to deduce the exact type and read the rest of data with apprioprite iovec/readv.

C# can send whole objects as an array but how to interpret it in C/C++?

I want both C/C++ and C# clients to work with the same protocol but that is the first time I designed the protocol and I’m not sure all my ideas will work together.

Any hint’d be appreciated.

  • 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-22T17:39:21+00:00Added an answer on May 22, 2026 at 5:39 pm

    Don’t try to define your protocol in terms of structs.

    Define the format of an announcement, i.e. what bytes in what order constitute an announcement, and then define how multiple announcements are transmitted in sequence.

    Once you’ve got this wire format defined, you can implement parsers and writers in each programming language, using the most appropriate programming language constructs, libraries and frameworks available in each.

    A good example for this is protobuf: format specification, C++, Java, Python implementation, .NET implementation.

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

Sidebar

Related Questions

I'm developing a client/server app that will communicate via rest. Some custom request data
I need a UDP server that can communicate with many clients. My current thinking
I know there is a function somewhere that will accept a client rect and
I want to create an application which will have a client and server components.
I want to communicate xml serialized objects from the server to the client and
I have client and server programs which now communicate via TCP. I'm trying out
I have a client and a server application which communicate over .NET 2.0 Remoting
I have created a JAX-WS client within eclipse that will communicate with a web
I am using TcpClient to communicate with a server that sends information in form
I need to write a program that will communicate with other .NET programs ...

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.