network help needed

Unknown W. Brackets unknown at
Wed Oct 25 18:48:12 PDT 2006

No, the operating system doesn't peek in and notice sizes or delimiters.  I mean,
think of the endianness issues!

If you run into buffering, try padding.  I would suggest doing a simple test
program, connect the two machines to each other... and on one, send 4 bytes every

On the other, constantly receive from the socket, and see how many bytes you get
back each time.

Multithreading isn't too bad, actually.  Just avoid the use of globals... which
are, as it happens, how threads communicate.  Basically, if you have a pointer,
any thread can access the memory it points to (given a pointer to the same
memory.)  This is how they can communicate.

In other words, they all share one heap.

They can also access the memory at the same time, which can cause problems.  I
think there are good tutorials available on multithreading, which probably explain
it and the troubles involved better than I can.


More information about the Digitalmars-d-learn mailing list