[comp.sys.ibm.pc] NetBios problems with a token ring

martin@suna8.cs.uiuc.edu (02/04/90)

    Hello all,

	Currently I am working on a Face-to-Face/Computer- Mediated 
    communication experiment for another's dissertation.  It involves
    four people solving an inductive-learning problem with the 
    communication either by talking, or typing to each other on 
    different terminals.
	I'm using sessions in a token-ring environment to implement the
    computer-mediated part of the experiment; They are arranged so each
    session will only send/receive information in one direction, for 
    simplicity's sake.  My problem is that if I send messages very quickly,
    the communication hangs on all four stations.  The messages can be a 
    single character, but the mass of messages will still cause the 
    communications to halt.  I have played with send/receive timeouts
    in many different configurations, to no avail.  I have even made
    my program ack messages back, and hang on a send until an ack message
    has been received, but the problem goes away.  This suggests to me
    that it may not be a timeout problem at all, which baffles me.
	Please, if you have had experience with this before, and have an
    answer or work-around, please, PLEASE, let me know!  This program must
    work soon for this lady to collect data in time for her dissertation.

					Thanks in advance,
					- Rocco Martin

meyer@sunb8.cs.uiuc.edu (02/07/90)

NETbios on a token-ring system is very flaky to program for, I agree.  I had a
similar 'mysterious' problem where a host program sent/received various types &
sizes of messages to a number of client programs via sessions, with timer 
messages sent via datagram.  The host program would randomly hang upon receipt
of one type of message, often working perfectly for 5-10 minutes before hanging.ng.
This message is neither the smallest nor largest message, so no buffer overflow
problems.  The solution - I implemented this specific message in datagram, an
now it works perfectly.  

I'm not sure if you're doing this already, or not - but you may want to try
posting one or more receives ahead of time.  I generally do this as a rule - 
it tends to avoid blocking and improve throughput.  (It doesn't work well under 
Windows/386 - any program using posted netbios commands will receive a "Not
enough NCBs" error returned from the post command.)  I have generally excellent
success otherwise.


_____
	Don Meyer
	internet:  dlmeyer@uiuc.edu  (sunb8.cs.uiuc.edu)
	quote du jour:	"If, indeed, there exists Artificial Intelligence,
			  then there must also exist Artificial Stupidity" - ???