Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WCF and WF
  4. Communicating with a unmanged c++ TCP connection

Communicating with a unmanged c++ TCP connection

Scheduled Pinned Locked Moved WCF and WF
csharpc++sysadminjsonhelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    earlgraham
    wrote on last edited by
    #1

    I have to write a client that gets its data through a TCP connection from a server written in unmanaged C++ (It does support managed c++ though). It sends a large structure. The Structure is unmanaged. It even has unmanaged structures in the structure. My client must be C#. I have two chooses (as I see it); 1) Modify the server to package the data into an managed type. The server does support c++ managed code. Making it easy on the client. 2) Or Parse the binary incoming TCP message, then place it into a managed structure on client. I'm leaning toward option 1. Since I think it will allow more versatility, however the programmers that wrote the original server think the parsing is a simple method. I hope someone can help me Decide. Thanks Glenn

    Programmer Glenn Earl Graham Austin, TX

    H 1 Reply Last reply
    0
    • E earlgraham

      I have to write a client that gets its data through a TCP connection from a server written in unmanaged C++ (It does support managed c++ though). It sends a large structure. The Structure is unmanaged. It even has unmanaged structures in the structure. My client must be C#. I have two chooses (as I see it); 1) Modify the server to package the data into an managed type. The server does support c++ managed code. Making it easy on the client. 2) Or Parse the binary incoming TCP message, then place it into a managed structure on client. I'm leaning toward option 1. Since I think it will allow more versatility, however the programmers that wrote the original server think the parsing is a simple method. I hope someone can help me Decide. Thanks Glenn

      Programmer Glenn Earl Graham Austin, TX

      H Offline
      H Offline
      hb52134214
      wrote on last edited by
      #2

      Would it make sense to add a layer between the unmanaged c++ and the C# that is a managed c++ app that would translate to a seralized type? Changing the server to serve managed data only serves to force all clients to be managed code. If you have the freedom to add a second port on the server that provides the go between interface, then your server/client interfaces could look like the following: Server Port x binary structure comm Port y managed structure comm Managed client connects to port y Unmanaged client connects to port x The application on port y could be a small stub that locally connects and translates the data to/from port x.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups