Re: TCP Streams from Unknown source to VB.Net
- From: "Goran Sliskovic" <gsliskov@xxxxxxxxx>
- Date: Mon, 8 Jan 2007 17:14:55 +0100
"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 -real-time
definitely unmanaged, in every sense of the term - and it's sending
data back to a desktop with a Visual BASIC .Net interface. On the serveror
remote computer, a data structure is created, a header attached to tellthe
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
.
- Prev by Date: Re: Error while invoking remoteobject method
- Next by Date: Re: TCP Streams from Unknown source to VB.Net
- Previous by thread: Re: Error while invoking remoteobject method
- Next by thread: Re: TCP Streams from Unknown source to VB.Net
- Index(es):
Relevant Pages
|