2010-06-10 00:03 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)

* examples/uhttpd2/umain.prg
  * examples/uhttpd2/uhttpd2.hbp
  - examples/uhttpd2/socket.c
    + Changed to use core SOCKET API.

  * examples/uhttpd2/run.prg
    + Displays port it listens on.

  * examples/httpsrv/uhttpd.prg
    + Using hbsocket.ch constant instead of local one.
This commit is contained in:
Viktor Szakats
2010-06-09 22:04:01 +00:00
parent ea7e1d15b9
commit b602644e09
6 changed files with 55 additions and 330 deletions

View File

@@ -117,8 +117,6 @@
#define APP_VER_NUM "0.4.4"
#define APP_VERSION APP_VER_NUM + APP_GD_SUPPORT + APP_DT_SUPPORT
#define AF_INET 2
// default values - they can changes using line command switch or ini file
#define START_RUNNING_THREADS 6 // Start threads to serve connections
@@ -533,7 +531,7 @@ FUNCTION MAIN( ... )
// --------------------------------------------------------------------------
hListen := hb_socketOpen()
IF ! hb_socketBind( hListen, { AF_INET, "0.0.0.0", nPort } )
IF ! hb_socketBind( hListen, { HB_SOCKET_AF_INET, "0.0.0.0", nPort } )
? "bind() error", hb_socketGetError()
ELSEIF ! hb_socketListen( hListen )
? "listen() error", hb_socketGetError()