HighTechTalks DotNet Forums  

TCP Streams from Unknown source to VB.Net

Dotnet Framework (Remoting) microsoft.public.dotnet.framework.remoting


Discuss TCP Streams from Unknown source to VB.Net in the Dotnet Framework (Remoting) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
knockNrod
 
Posts: n/a

Default TCP Streams from Unknown source to VB.Net - 01-07-2007 , 04:24 AM






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.)

I thought it was MS intent or vision to use a binary formatter object to
suck in this data through a structure object by making the structure on the
VB side serializable and then it would all line up nice and neat like it used
to in VB6. What I'm reading on here is that .Net remoting, that is, using
the binary formatter object, still won't understand the messages coming in
from the server. Is this possible in .Net? Should I plan on abandoning .Net
altogether and replatform the interface in unmanaged (MFC/API) code? (Yuck!)
I've got to admit that I'd rather switch to another operating system if it
came to that.

I have some control over the server source code, but I can't just migrate it
entirely into .Net because some of our customers insist we still support
their existing systems which can be Windows, (L)Unix, and VAX/VMS. As far as
I know, .Net framework only exists on Windows boxes, so the more I move the
server into the .Net realm, the more complicated and expensive the server
code is to maintain. I'd rather tame the VB.Net code, if that's possible.

Any thoughts or suggestions would be appreciated! I'm really pulling my
hair out on this.

-rod

Reply With Quote
  #2  
Old   
Goran Sliskovic
 
Posts: n/a

Default Re: TCP Streams from Unknown source to VB.Net - 01-08-2007 , 11:14 AM







"knockNrod" <knockNrod (AT) discussions (DOT) microsoft.com> wrote

Quote:
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




Reply With Quote
  #3  
Old   
msgroup
 
Posts: n/a

Default Re: TCP Streams from Unknown source to VB.Net - 01-08-2007 , 10:04 PM



Hi, KnockNrod:

You can use usocket.dll inside our SocketPro at www.udaparts.com to
communicate with any types of other platforms on TCP/IP communication. You
can see the old VB6 sample at ..\SocketPro\samples\others\client\vb6\gethtml
after downloading and install.

Note that the usocket.dll is completely free and supports SSL/TLS to
secure socket communication as shown in the above sample.

Furthermore, we have CE versions of usocket.dll inside the directory
...\SocketPro\binCE\ARMV4 and ..\SocketPro\binCE\emulator.

Wish the usocket.dll is a big help to you.

Regards,


"knockNrod" <knockNrod (AT) discussions (DOT) microsoft.com> wrote

Quote:
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.)

I thought it was MS intent or vision to use a binary formatter object to
suck in this data through a structure object by making the structure on
the
VB side serializable and then it would all line up nice and neat like it
used
to in VB6. What I'm reading on here is that .Net remoting, that is, using
the binary formatter object, still won't understand the messages coming in
from the server. Is this possible in .Net? Should I plan on abandoning
.Net
altogether and replatform the interface in unmanaged (MFC/API) code?
(Yuck!)
I've got to admit that I'd rather switch to another operating system if it
came to that.

I have some control over the server source code, but I can't just migrate
it
entirely into .Net because some of our customers insist we still support
their existing systems which can be Windows, (L)Unix, and VAX/VMS. As far
as
I know, .Net framework only exists on Windows boxes, so the more I move
the
server into the .Net realm, the more complicated and expensive the server
code is to maintain. I'd rather tame the VB.Net code, if that's possible.

Any thoughts or suggestions would be appreciated! I'm really pulling my
hair out on this.

-rod



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.