I need examples of use netio.
For me newbe user, how to make server activate and client side conections.

Best Regards,
Itamar M. Lins Jr.

<dru...@users.sourceforge.net> escreveu na 
mensagem news:e1nuilw-0001f1...@c3vjzd1.ch3.sourceforge.com...
> Revision: 13532
> 
> http://harbour-project.svn.sourceforge.net/harbour-project/?rev=13532&view=rev
> Author:   druzus
> Date:     2010-01-11 11:22:05 +0000 (Mon, 11 Jan 2010)
>
> Log Message:
> -----------
> 2010-01-11 12:21 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
>  * harbour/src/rtl/hbznet.c
>    * move hb_znetOpen() parameter validation from HB_INETCOMPRESS()
>      to hb_znetOpen() - it should help keeping other code using
>      hb_znetOpen() more simple
>
>  * harbour/contrib/hbnetio/netio.h
>  * harbour/contrib/hbnetio/netiocli.c
>  * harbour/contrib/hbnetio/netiosrv.c
>    + added support for compression and encryption in NETIO connection
>      streams. Enabling encryption (password) automatically enable also
>      compression. If necessary user can set compression level to
>      HB_ZLIB_COMPRESSION_NONE. HB_ZLIB_COMPRESSION_DISABLE used as
>      compression level removes compression and encryption.
>      See below for details of NETIO server and client code modifications.
>
>  * harbour/contrib/hbnetio/netiocli.c
>    + extended NETIO_CONNECT() client side function parameters:
>         NETIO_CONNECT( [<cServer>], [<cPort>], [<nTimeOut>], ;
>                        [<cPasswd>], [<nCompressionLevel>], [<nStrategy>] )
>            -> <lOK>
>    % changed the behavior of NETIO_CONNECT() client side function.
>      In the previous version this function was connecting to the server
>      and then disconnecting so it was used to check if connection is
>      available and to set default connection parameters.
>      Now it does not disconnect after successful connection so created
>      connection is keept and can be reused by any pending NETIO_*() calls.
>      User can open many different connections in the same time.
>      The connections are recognized by server and port address.
>      The connections set by NETIO_CONNECT() function can be closed by
>      NETIO_DISCONNECT() function.
>      Each repeated call to NETIO_CONNECT() increase reference counter
>      in the connection stream and need corresponding number of
>      NETIO_DISCONNECT() calls.
>    + added new PRG client side function:
>         NETIO_DISCONNECT( [<cServer>], [<cPort>] ) -> <lOK>
>      which closes connections set by NETIO_CONNECT().
>    + added support for passing connection password as part of file path
>      or function name in format:
>         <server>[:<port>[:<passwd>]]:<filepath|funcname>
>      i.e.:
>         192.168.0.1:2941:secret:path/to/file
>      Please remember that it's only an alternative method of setting
>      encryption which does not allow to use CHR(0) or ":" in passwords.
>      User can always set connection using NETIO_CONNECT() function which
>      will be used in RPC or FILE IO calls. If more then one connection
>      is set by NETIO_CONNECT() then user can chose the connection using
>      only server and port. It's not necessary to pass other connection
>      parameters.
>    + added support for UNC paths:
>         //<server>[:<port>]/<filepath|funcname>
>      i.e.:
>         //192.168.0.1:2941/path/to/file
>      backslashes (\\) are also supported.
>
>  * harbour/contrib/hbnetio/netiosrv.c
>    % moved 1-st login identification from NETIO_ACCEPT() to NETIO_SERVER()
>      Such version do not block other connection accepting when server
>      waits for NETIO_LOGIN frame so it improve scalability and also
>      protect against code which may want to block access to the server
>      by opening dummy connections.
>    + added new parameters to NETIO_ACCEPT() function which allows to set
>      encryption and compression for new connections:
>         NETIO_ACCEPT( <pListenSocket>, [<nTimeOut>],
>                       [<cPass>], [<nCompressionLevel>], [<nStrategy>] )
>            -> <pConnectionSocket> | NIL
>    + added new server side function:
>         NETIO_COMPRESS( <pConnectionSocket>,
>                         [<cPass>], [<nCompressionLevel>], [<nStrategy>] )
>            -> NIL
>      which allow to set or change encryption and compression parameters
>      in existing connections
>
>  * harbour/contrib/hbnetio/netiomt.prg
>    * updated to accept new connection parameters in NETIO_MTSERVER()
>      function:
>         NETIO_MTSERVER( [<nPort>], [<cIfAddr>], [<cRootDir>], [<lRPC>],
>                         [<cPasswd>], [<nCompressionLevel>], 
> [<nStrategy>] )
>            -> <pListenSocket>
>
>  * harbour/contrib/hbnetio/utils/netiosrv.prg
>    + added 5-th parameter <passwd> which enable encryption with 
> compression,
>      current syntx is:
>         netiosrv [<port>] [<inetaddr>] [<rootdir>] [<rpc>] [<passwd>]
>      For default values use "" in command line for skipped parameters, 
> i.e.:
>         netiosrv "" "" "" 1 topsecret
>
>  * harbour/contrib/hbnetio/tests/netiotst.prg
>    * enable RPC, compression and encryption in test code
>    + added simple code which use RPC to create directory on the server 
> side
>
>
>   Now it's possible to easy create secure NETIO connections and 
> compression
>   should help in slow connections when big number of data has to be
>   exchange. In RDD file access it mostly help when tables use long 
> records.
>
>   Hope you will find it useful. Please make tests.
>
> Modified Paths:
> --------------
>    trunk/harbour/ChangeLog
>    trunk/harbour/contrib/hbnetio/netio.h
>    trunk/harbour/contrib/hbnetio/netiocli.c
>    trunk/harbour/contrib/hbnetio/netiomt.prg
>    trunk/harbour/contrib/hbnetio/netiosrv.c
>    trunk/harbour/contrib/hbnetio/tests/netiotst.prg
>    trunk/harbour/contrib/hbnetio/utils/netiosrv.prg
>    trunk/harbour/src/rtl/hbznet.c
>
>
> This was sent by the SourceForge.net collaborative development platform, 
> the world's largest Open Source development site. 



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

Reply via email to