.NET Client Submitting Tab Delimited String to C++ Server Loses Em

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

We have a .NET 2.0 Client (C#) that communicates with a C++ (2005) Server
via TCP. The tab delimited strings "January\tFebruary" and
"January\t\tFebruary" submitted by the client both arrive at the server as
"January\tFebruary". We need to be able to preserve the existance of 3
elements in the second input string (the middle element being null). Is
this a bug in the communcation? Is there some solution short of requiring
the server to handle some other delimiter?
 
Hello Matthew,
Is this a bug in the communcation?

TCP doesn't care about the kind of data you transmit - if you send 17
characters, this translates into a byte sequence that will be transmitted
unchanged to the other side, and that can be decoded into the same 17
characters after reception. If anything goes wrong with this, it will be
your own encoding/decoding code making the mistake.

If you post some code that reproduces the problem, we might have a look -
without that it's impossible to say what causes the problem.


Oliver Sturm
 
Back
Top