sa****@gmail.com writes:
I need the explanation/code to transmit a complex datastructure like
Linked list or binary tree
using sockets from client to sever...
If you find a way to serialize and deserialize the information
contained in the nodes then you can use either XML or, easier to use,
LISP syntax to send the information along with the structure.
A
/ \
B C
/ \ / \
D E F G
The above structure can be sent as:
(A (B (D E)) (C (F G)))
You can run into problems if you have ( and ) as part of the
information in the nodes. If you escape those characters or if you
encode all the information in the nodes to use printable characters
except for '(' and ')' in a specific encoding you should be safe and
have an almost portable protocol.
Check uuencode and uudecode for hints.
--
Ioan - Ciprian Tandau
tandau _at_ freeshell _dot_ org (hope it's not too late)
(... and that it still works...)