2009-09-07 21:16 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
+ contrib/hbnetio/utils
+ contrib/hbnetio/utils/netiosrv.prg
+ contrib/hbnetio/utils/hbmk.hbm
+ Committed simple server code posted in the ChangeLog entry
from Przemek. I've added very simple passing of port and
address parameters, this can be enhanced in the future
using proper switches. Plus maybe an option to avoid
accidental exit by keypress.
This commit is contained in:
@@ -17,6 +17,16 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2009-09-07 21:16 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
+ contrib/hbnetio/utils
|
||||
+ contrib/hbnetio/utils/netiosrv.prg
|
||||
+ contrib/hbnetio/utils/hbmk.hbm
|
||||
+ Committed simple server code posted in the ChangeLog entry
|
||||
from Przemek. I've added very simple passing of port and
|
||||
address parameters, this can be enhanced in the future
|
||||
using proper switches. Plus maybe an option to avoid
|
||||
accidental exit by keypress.
|
||||
|
||||
2009-09-07 18:18 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/source/rtl/hbsocket.c
|
||||
% modified hb_socketResolveAddr() to try use given address in
|
||||
|
||||
6
harbour/contrib/hbnetio/utils/hbmk.hbm
Normal file
6
harbour/contrib/hbnetio/utils/hbmk.hbm
Normal file
@@ -0,0 +1,6 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
../hbnetio.hbc
|
||||
-mt
|
||||
26
harbour/contrib/hbnetio/utils/netiosrv.prg
Normal file
26
harbour/contrib/hbnetio/utils/netiosrv.prg
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* demonstration/test code for alternative RDD IO API which uses own
|
||||
* very simple TCP/IP file server.
|
||||
*
|
||||
* Copyright 2009 Przemyslaw Czerpak <druzus / at / priv.onet.pl>
|
||||
* www - http://www.harbour-project.org
|
||||
*
|
||||
*/
|
||||
|
||||
proc main( cPort, cAddress )
|
||||
local pListenSocket
|
||||
|
||||
pListenSocket := netio_mtserver( hb_ntos( cPort ), cAddress )
|
||||
if empty( pListenSocket )
|
||||
? "Cannot start server."
|
||||
else
|
||||
wait "Press any key to stop NETIO server."
|
||||
netio_serverstop( pListenSocket )
|
||||
pListenSocket := NIL
|
||||
endif
|
||||
return
|
||||
Reference in New Issue
Block a user