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

Creating and Sending Packets over TCP

P: n/a
I am writing a network system for project I am working on. How would I send a
class or structure to the clients and recieve one back.

Or how would I go about building a packet with a header and other
information and then be able to break it apart when I recieve it at the other
end. These packets can be of Varible length but would always have the same
header. I want to build someting simular to the DirectPlay System of packets
and networking.
Nov 16 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
I have done some reading and found that I think I need to serialize the
object. I am now looking for examples on doing this with an Object.

I need to serialize the object, then send it down the TCP Connection (Bytes)
and then rebuild it later. What streams and Methods do I use. Examples would
be great.

"Glenn Wilson" wrote:
I am writing a network system for project I am working on. How would I send a
class or structure to the clients and recieve one back.

Or how would I go about building a packet with a header and other
information and then be able to break it apart when I recieve it at the other
end. These packets can be of Varible length but would always have the same
header. I want to build someting simular to the DirectPlay System of packets
and networking.

Nov 16 '05 #2

P: n/a
I suggest you research .NET remoting and web services. Search around Google or MSDN and you'll find a ton of topics.

There is a remoting thread you can post questions on. That would be a more appropriate place then a C# thread.

Remoting will allow you to serialize and deserialize objects and pass them through registered channels via TCP or HTTP connections.
You have your choice of serializers for SOAP XML or Binary depending on the context of your application and it's data. The web
services framework is integrated into the VS.NET IDE so it's easy to create web services (for sending objects and data over the
internet) with a few clicks.

Good Luck.

--
Dave Sexton
ds*************@somethingdigitalBYE-SPAM.com (remove BYE-SPAM)
[Please do not reply by email unless asked to]
-----------------------------------------------------------------------
"Glenn Wilson" <Gl*********@discussions.microsoft.com> wrote in message news:3C**********************************@microsof t.com...
I have done some reading and found that I think I need to serialize the
object. I am now looking for examples on doing this with an Object.

I need to serialize the object, then send it down the TCP Connection (Bytes)
and then rebuild it later. What streams and Methods do I use. Examples would
be great.

"Glenn Wilson" wrote:
I am writing a network system for project I am working on. How would I send a
class or structure to the clients and recieve one back.

Or how would I go about building a packet with a header and other
information and then be able to break it apart when I recieve it at the other
end. These packets can be of Varible length but would always have the same
header. I want to build someting simular to the DirectPlay System of packets
and networking.

Nov 16 '05 #3

P: n/a
I do not think Remoting is what I need as I need to have a connection to the
server to transfer data back and forth, Async Sockets, (I am Converting the
old Textbased MUD enviroment to Tile based GUI system) as DirectPlay is no
longer being worked on I need to Create my own solution.
"Dave" <NO*********@dotcomdatasolutions.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
I suggest you research .NET remoting and web services. Search around
Google or MSDN and you'll find a ton of topics.

There is a remoting thread you can post questions on. That would be a
more appropriate place then a C# thread.

Remoting will allow you to serialize and deserialize objects and pass them
through registered channels via TCP or HTTP connections.
You have your choice of serializers for SOAP XML or Binary depending on
the context of your application and it's data. The web
services framework is integrated into the VS.NET IDE so it's easy to
create web services (for sending objects and data over the
internet) with a few clicks.

Good Luck.

--
Dave Sexton
ds*************@somethingdigitalBYE-SPAM.com (remove BYE-SPAM)
[Please do not reply by email unless asked to]
-----------------------------------------------------------------------
"Glenn Wilson" <Gl*********@discussions.microsoft.com> wrote in message
news:3C**********************************@microsof t.com...
I have done some reading and found that I think I need to serialize the
object. I am now looking for examples on doing this with an Object.

I need to serialize the object, then send it down the TCP Connection
(Bytes)
and then rebuild it later. What streams and Methods do I use. Examples
would
be great.

"Glenn Wilson" wrote:
> I am writing a network system for project I am working on. How would I
> send a
> class or structure to the clients and recieve one back.
>
> Or how would I go about building a packet with a header and other
> information and then be able to break it apart when I recieve it at the
> other
> end. These packets can be of Varible length but would always have the
> same
> header. I want to build someting simular to the DirectPlay System of
> packets
> and networking.


Nov 16 '05 #4

P: n/a
Serialization is a mathod to "pack" an object in a binary form.
When you deserialize the object you have a copy of the serializated object.

If you want to use objects to communicate between server and clients,
serialization will be very handy.

"Glenn Wilson" <ir****@hotmail.com> schrieb im Newsbeitrag
news:%2****************@TK2MSFTNGP15.phx.gbl...
I do not think Remoting is what I need as I need to have a connection to the server to transfer data back and forth, Async Sockets, (I am Converting the old Textbased MUD enviroment to Tile based GUI system) as DirectPlay is no
longer being worked on I need to Create my own solution.
"Dave" <NO*********@dotcomdatasolutions.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
I suggest you research .NET remoting and web services. Search around
Google or MSDN and you'll find a ton of topics.

There is a remoting thread you can post questions on. That would be a
more appropriate place then a C# thread.

Remoting will allow you to serialize and deserialize objects and pass them through registered channels via TCP or HTTP connections.
You have your choice of serializers for SOAP XML or Binary depending on
the context of your application and it's data. The web
services framework is integrated into the VS.NET IDE so it's easy to
create web services (for sending objects and data over the
internet) with a few clicks.

Good Luck.

--
Dave Sexton
ds*************@somethingdigitalBYE-SPAM.com (remove BYE-SPAM)
[Please do not reply by email unless asked to]
-----------------------------------------------------------------------
"Glenn Wilson" <Gl*********@discussions.microsoft.com> wrote in message
news:3C**********************************@microsof t.com...
I have done some reading and found that I think I need to serialize the
object. I am now looking for examples on doing this with an Object.

I need to serialize the object, then send it down the TCP Connection
(Bytes)
and then rebuild it later. What streams and Methods do I use. Examples
would
be great.

"Glenn Wilson" wrote:

> I am writing a network system for project I am working on. How would I > send a
> class or structure to the clients and recieve one back.
>
> Or how would I go about building a packet with a header and other
> information and then be able to break it apart when I recieve it at the > other
> end. These packets can be of Varible length but would always have the
> same
> header. I want to build someting simular to the DirectPlay System of
> packets
> and networking.



Nov 16 '05 #5

P: n/a
> (I am Converting the old Textbased MUD enviroment to Tile based GUI system

Well I'm not sure about the "MUD" or "Tile" environments that you are refering to.
as DirectPlay is no
longer being worked on I need to Create my own solution.
If DirectPlay is what you need then I suggest using DirectX 9.0 SDK. It provides a .NET wrapper around the new DirectX library and
integrates the help system into VS.NET.

As far as I know DirectPlay is still "being worked on". I'm not sure what you are refering to. If you need help with DirectX there
is a DirectX thread you can post to.
I need to serialize the object, then send it down the TCP Connection
(Bytes)
and then rebuild it later
FYI, remoting is an abstraction from Sockets. If you need sockets then the remoting framework just provides a way for you to
serialize and deserialze objects without the hassel of low level socket coding.

All in all, the C# thread is not an appropriate place for your inquiry. You will most likely not find the answers you are looking
for by posting to this thread.

Hope this helps.

--
Dave Sexton
ds*************@somethingdigitalBYE-SPAM.com (remove BYE-SPAM)
[Please do not reply by email unless asked to]
-----------------------------------------------------------------------
"Glenn Wilson" <ir****@hotmail.com> wrote in message news:%2****************@TK2MSFTNGP15.phx.gbl... I do not think Remoting is what I need as I need to have a connection to the
server to transfer data back and forth, Async Sockets, (I am Converting the
old Textbased MUD enviroment to Tile based GUI system) as DirectPlay is no
longer being worked on I need to Create my own solution.
"Dave" <NO*********@dotcomdatasolutions.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
I suggest you research .NET remoting and web services. Search around
Google or MSDN and you'll find a ton of topics.

There is a remoting thread you can post questions on. That would be a
more appropriate place then a C# thread.

Remoting will allow you to serialize and deserialize objects and pass them
through registered channels via TCP or HTTP connections.
You have your choice of serializers for SOAP XML or Binary depending on
the context of your application and it's data. The web
services framework is integrated into the VS.NET IDE so it's easy to
create web services (for sending objects and data over the
internet) with a few clicks.

Good Luck.

--
Dave Sexton
ds*************@somethingdigitalBYE-SPAM.com (remove BYE-SPAM)
[Please do not reply by email unless asked to]
-----------------------------------------------------------------------
"Glenn Wilson" <Gl*********@discussions.microsoft.com> wrote in message
news:3C**********************************@microsof t.com...
I have done some reading and found that I think I need to serialize the
object. I am now looking for examples on doing this with an Object.

I need to serialize the object, then send it down the TCP Connection
(Bytes)
and then rebuild it later. What streams and Methods do I use. Examples
would
be great.

"Glenn Wilson" wrote:

> I am writing a network system for project I am working on. How would I
> send a
> class or structure to the clients and recieve one back.
>
> Or how would I go about building a packet with a header and other
> information and then be able to break it apart when I recieve it at the
> other
> end. These packets can be of Varible length but would always have the
> same
> header. I want to build someting simular to the DirectPlay System of
> packets
> and networking.



Nov 16 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.