Re: TCP Streams from Unknown source to VB.Net




"knockNrod" <knockNrod@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:A15721F7-68ED-4D0B-B609-C6A29DEBFBF7@xxxxxxxxxxxxxxxx
I'm trying to figure out how all of this is supposed to fit together.
I've
got a C/C++ application on a server, could be Unix, OpenVMS, or Windows -
definitely unmanaged, in every sense of the term - and it's sending
real-time
data back to a desktop with a Visual BASIC .Net interface. On the server
or
remote computer, a data structure is created, a header attached to tell
the
client what type of message and how many bytes, and the entire contents of
the data structure is sent in binary format out over a socket.

How do I receive that in Visual Basic .Net? Structures in VB.Net, aren't
structures, they're objects, and for some reason these structure objects
can't contain arrays. (Although arrays in VB.Net aren't arrays, either --
they, too are objects, so to be technically correct, I should say that the
Structure Object isn't allowed to contain an Array Object in VB.Net.)
....

You have no other choice then manually encode/decode incoming messages, byte
by byte. Data that you receive must be defined somwhere (low-level binary
format). You have to implement it yourself in .NET. Structures/data
representation vary on different platforms/compilers, even an integer is not
the same in all representations. .NET serialization works only between .NET
programs (that use same formatter). It has nothing to do with .NET, it
cannot be handled much differently on any other platform. That's why some
formating standards exist (eg. XML) to make data exchenge easier.

Regards,
Goran


.



Relevant Pages

  • Re: [PATCH] cpumask 5/10 rewrite cpumask.h - single bitmap based implementation
    ... >> likewise for whatever else is copying unsigned long arrays to userspace. ... The kernel bitmaps/cpumasks are arrays ... > I presume that it is too late to change the low level format of masks ... since it seems the perfctr stuff Mikael Pettersson ...
    (Linux-Kernel)
  • Re: Challenge: reading ascii data
    ... can process the U,V records below -> internal arrays and then output UV ... matches the UV output format shown. ... character:: dat ... output time frames time,u,v,uv from arrays ...
    (comp.lang.fortran)
  • Re: Challenge: reading ascii data
    ... can process the U,V records below -> internal arrays and then output UV product records in format requested by ... I will post my Fortran code once someone posts a non-Fortran solution that matches the UV output format shown. ... character:: dat ... output time frames time,u,v,uv from arrays ...
    (comp.lang.fortran)
  • Re: Challenge: reading ascii data
    ... can process the U,V records below -> internal arrays and then output UV ... matches the UV output format shown. ... character:: dat ... output time frames time,u,v,uv from arrays ...
    (comp.lang.fortran)
  • Newbee: Lispy alternatives for configuration information file
    ... I currently have a program that stores configuration information ... in a modified window's INI file format. ... read at runtime and loads internal values and arrays. ... to utilize the lisp reader facilities, but not make the data appear ...
    (comp.lang.lisp)