Hi,

On 2010.04.30 12:39, dru...@users.sourceforge.net wrote:
     + added support for communication streams/channels which allow to
       send asynchronously data from server to client.
       The following client side functions had been added:
          NETIO_OPENDATASTREAM(<cStreamFuncName>  [,<params,...>] )
             ->  <nStreamID>
          NETIO_OPENITEMSTREAM(<cStreamFuncName>  [,<params,...>] )
             ->  <nStreamID>
          NETIO_CLOSESTREAM(<nStreamID>, [<cServer>], [<nPort>] )
             ->  <lOK>
          NETIO_GETDATA(<nStreamID>, [<cServer>], [<nPort>] )
             ->  <aData>  |<cData>  | NIL
       The following server side functions had been added:
          NETIO_SRVSTATUS(<pConnectionSocket>  [,<nStreamID>] )
             ->  <nStatus>
          NETIO_SRVSENDITEM(<pConnectionSocket>,<nStreamID>,<xData>  )
             ->  <lSent>
          NETIO_SRVSENDDATA(<pConnectionSocket>,<nStreamID>,<cData>  )
             ->  <lSent>

Thank You for another great piece of code. I'm trying to understand the ideas of this.

In case of item stream, received items are buffered on client side and NETIO_GETDATA() return array of items. In case of char stream, data is concatenated and NETIO_GETDATA() return a single stream. Function NETIO_GETDATA() is not blocking function and returns NIL if no data are received. Am I right?

You've mentioned in the past, that these communication streams allows server application to give access to local resources like COM ports, etc. In most cases, f.e. COM port, communication is bidirectional, but I found communication stream unidirectional (from server to client). How do you suggest to do data transfer in the opposite direction?

In the sample code, the communication streams are closed after NETIO_DISCONNECT(). Is data transfer allowed in between of NETIO_DISCONNECT() and NETIO_CLOSESTREAM() calls?

Are connection stream ids unique among multiple connection? As far as I can see, each connection has it's own connection ideas, and this requires to use additional cServer and nPort parameters to distinguish different connections. I see s_fileGetConnParam(), hb_socketResolveAddr(), s_fileConFind() in NETIO_GETDATA(). Isn't this a bottleneck for applications what needs a lot of data transfers? The same question for RPC calls.


Thanks again, regards,
Mindaugas
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to