Software /
code /
prosody
Comparison
net/server_event.lua @ 2110:99a7f291ddd8
net.server_event: Change to new standard addserver() syntax
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 21 Nov 2009 17:23:51 +0000 |
parent | 2097:642806f67b75 |
child | 2111:f59d9738437e |
comparison
equal
deleted
inserted
replaced
2109:0dc5eb9dbb62 | 2110:99a7f291ddd8 |
---|---|
637 return interface | 637 return interface |
638 end | 638 end |
639 end | 639 end |
640 | 640 |
641 local addserver = ( function( ) | 641 local addserver = ( function( ) |
642 return function( addr, port, listener, pattern, backlog, sslcfg, startssl ) -- TODO: check arguments | 642 return function( addr, port, listener, pattern, sslcfg, startssl ) -- TODO: check arguments |
643 --vdebug( "creating new tcp server with following parameters:", addr or "nil", port or "nil", sslcfg or "nil", startssl or "nil") | 643 --vdebug( "creating new tcp server with following parameters:", addr or "nil", port or "nil", sslcfg or "nil", startssl or "nil") |
644 local server, err = socket.bind( addr, port, backlog ) -- create server socket | 644 local server, err = socket.bind( addr, port, cfg.ACCEPT_QUEUE ) -- create server socket |
645 if not server then | 645 if not server then |
646 debug( "creating server socket failed because:", err ) | 646 debug( "creating server socket failed because:", err ) |
647 return nil, err | 647 return nil, err |
648 end | 648 end |
649 local sslctx | 649 local sslctx |