?:IPX, SPX or NetBIOS experiences

Hi!

I've been trying to make some network programming for half a year now.
It all began with IPX/SPX. After some test programs and with help of Brown's
interrupt list I wrote a small IPX unit and could send some packets over the
network.
But it wasn't that good as I wanted it (slow, etc.). I never was able to
write such a fast ESR that no packets got lost (ASM!!). Opening more
listening ECBs leaded to a crash after some time. I think this is logical,
because when the ESR is running while the second or third ECB receives a
packet, the ESR would be called a second time before it has finnished to
handle the 1. ECB --> BUT HOW CAN I DO ELSE ?? You CAN open more ECBs for
listening for a packet, but what do I have to notice? (Note: My ESRs are
nearly complete ASM (sometimes only, sometimes a TURBO PASCAL function is
called out of the ASM ESR, but there is not too much code! ).

Then I tried to use SPX, but that didn't work either. The PC which LISTENS
FOR A SPX CONNECTION waits and when the other PC "calls" this machine, my
ESR is called, too, but without any information in the SPX header --> WHERE
DO I GET THE CONNECTON ID NUMBER FROM?! :-(

After being disappointed from IPX and SPX several times :-)) I thought of
trying NetBIOS.
And how could it be: YES! This works... Or let us say: This works
MORE/BETTER than IPX/SPX.
I have a good documentation about the NetBIOS functions (NBREF.DOC) and so
on but some problems do appear even here:

1. In DOS (load IPXODI, etc. and then NETBIOS.EXE): When I start my program
the initializing NetBIOS functions need a long time, for example the ADDNAME
function (in WAITMODE).
NETRESET or ADDNAME for example need 3-5 seconds until it gives the control
back to my program again. In a Windows95 DOS Box it is a bit faster. But
this routins shouldn't take so much time, do they?

2. In Windows95 Dos Box : If I call the NETRESET function of NetBIOS at the
startup of my program, Windows shows a nice bluescreen with: "This app. was
closes as it exchanged information with the network
blah blah please restart the computer" (my translation, don't know the exact
english version of this message).
But this comes only when I call NETRESET --> But in DOS I MUST call this to
initialize NetBIOS!!

3. Somehow the DOS NETBIOS and the Win95-emulation from the MS-IPX
compatible protocole do not understand each other ?!?!?
When I start my NetProgram on both computers (the one in Win95 DosBox and
the other in Dos) no connection can be established :-(

4. Like in IPX, too: Even if the POST routine (something like the ESR from
IPX) is complete ASM, fast following BROADCAST packets are lost sometimes
(when the remote computer responses IMMEDIATELY to a broadcast packet).  -->
the PC which has sent the packet has first to handle his own broadcast
packet in the POST routine and while this is done the second PC answers -->
the packet gets lost

If I implement two POSTS with two NCBs listening then it's the same thing as
with IPX: the second POST
interrupts the first :-(

--> There must be a algorithm which I unfortunately haven't found yet :-)
Perhaps I'm blind or it's because I haven't programmed so much network yet.

Ok... If somebody has some docs or sources about IPX or SPX or NetBIOS or
even something else which has to do with LAN (perhaps TCP/IP), please let me
know. The best was PASCAL code, but C/C++ is ok, too.

Thanks in advance...

Tobias