By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,343 Members | 925 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,343 IT Pros & Developers. It's quick & easy.

Sending a structure by tcp?

P: n/a

Is there a way of sending a structure, or a class over
tcpip? The current way I am trying to do it is by using a
binary writer and sending the individual variables one by
one.

I know there is object serialization, but that sends all
the extra information that I dont need. I just want to
send the actual variables over the network, and no extra
class information.

Anybody know a better way to send a stucture?
Nov 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
When you say class or structure, do you mean the Class declaration or an
object, you may want to consider SOAP, Simple Object Access Protocol.

http://www.w3schools.com/soap/soap_intro.asp

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing

"jamie" <an*******@discussions.microsoft.com> wrote in message
news:04****************************@phx.gbl...

Is there a way of sending a structure, or a class over
tcpip? The current way I am trying to do it is by using a
binary writer and sending the individual variables one by
one.

I know there is object serialization, but that sends all
the extra information that I dont need. I just want to
send the actual variables over the network, and no extra
class information.

Anybody know a better way to send a stucture?

Nov 20 '05 #2

P: n/a
Jamie,
Using a Binary Writer as you are is the simplest form of Serialization that
is available in .NET.

Unless you need Serialization or Remoting (which uses Serialization) I would
recommend you continue using the Binary Writer...

It sounds like you already have an implementation, however the following
article offers using a BinaryReader & BinaryWriter to serializing a class to
a NetworkStream. I suspect you are doing the same thing.

http://msdn.microsoft.com/library/de...rp09182003.asp

The example is in C#, however it should be easily converted to VB.NET, post
if you need help.

Hope this helps
Jay
"jamie" <an*******@discussions.microsoft.com> wrote in message
news:04****************************@phx.gbl...

Is there a way of sending a structure, or a class over
tcpip? The current way I am trying to do it is by using a
binary writer and sending the individual variables one by
one.

I know there is object serialization, but that sends all
the extra information that I dont need. I just want to
send the actual variables over the network, and no extra
class information.

Anybody know a better way to send a stucture?

Nov 20 '05 #3

P: n/a
www.vbip.com
jamie wrote:
Is there a way of sending a structure, or a class over
tcpip? The current way I am trying to do it is by using a
binary writer and sending the individual variables one by
one.

I know there is object serialization, but that sends all
the extra information that I dont need. I just want to
send the actual variables over the network, and no extra
class information.

Anybody know a better way to send a stucture?


Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.