[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Questions about TCP



I am not sure about my usage of certain methods for communicating
over TCP/IP.  We are attempting to perform buffered I/O between
our Symbolics and a Unix BSD4.2 workstation.  After a connection to
a foreign host, I use the following methods to perform a buffered
SEND:

    (send tcp-stream :new-output-buffer)   ;; to allocate a transport buffer

    --- code to fill the buffer ---

    (send tcp-stream :send-output-buffer)  ;; to transmit the buffer to remote

If I type these forms into the evaluator, all works well.  If I compile
a function to do this, it only works sometimes.  It appears to be a timing
problem.  If I follow that last form with a

    (send tcp-stream :finish)

it works more often, but not always.  The symptom is that I follow this
function with another function to read (RECEIVE) a buffer from the
remote host.  Sometimes, the read function enters a Process Wait ("TCP-In")
and never returns again.  I feel that I must not be using these methods
correctly.  The application on the other host has been thoroughly tested
and is not buggy.

Can anyone offer suggestions?

d.haug
------
-------