Software /
code /
prosody
Comparison
net/server_select.lua @ 5776:bd0ff8ae98a8
Remove all trailing whitespace
author | Florian Zeitz <florob@babelmonkeys.de> |
---|---|
date | Fri, 09 Aug 2013 17:48:21 +0200 |
parent | 5664:4f499eb63c04 |
child | 5823:b8514209263c |
comparison
equal
deleted
inserted
replaced
5775:a6c2b8933507 | 5776:bd0ff8ae98a8 |
---|---|
1 -- | 1 -- |
2 -- server.lua by blastbeat of the luadch project | 2 -- server.lua by blastbeat of the luadch project |
3 -- Re-used here under the MIT/X Consortium License | 3 -- Re-used here under the MIT/X Consortium License |
4 -- | 4 -- |
5 -- Modifications (C) 2008-2010 Matthew Wild, Waqas Hussain | 5 -- Modifications (C) 2008-2010 Matthew Wild, Waqas Hussain |
6 -- | 6 -- |
7 | 7 |
8 -- // wrapping luadch stuff // -- | 8 -- // wrapping luadch stuff // -- |
9 | 9 |
605 send = socket.send | 605 send = socket.send |
606 receive = socket.receive | 606 receive = socket.receive |
607 shutdown = id | 607 shutdown = id |
608 _socketlist[ socket ] = handler | 608 _socketlist[ socket ] = handler |
609 _readlistlen = addsocket(_readlist, socket, _readlistlen) | 609 _readlistlen = addsocket(_readlist, socket, _readlistlen) |
610 | 610 |
611 -- remove traces of the old socket | 611 -- remove traces of the old socket |
612 _readlistlen = removesocket( _readlist, oldsocket, _readlistlen ) | 612 _readlistlen = removesocket( _readlist, oldsocket, _readlistlen ) |
613 _sendlistlen = removesocket( _sendlist, oldsocket, _sendlistlen ) | 613 _sendlistlen = removesocket( _sendlist, oldsocket, _sendlistlen ) |
614 _socketlist[ oldsocket ] = nil | 614 _socketlist[ oldsocket ] = nil |
615 | 615 |
693 if sender_locked and receiver.bufferlen() < buffersize then | 693 if sender_locked and receiver.bufferlen() < buffersize then |
694 sender:lock_read(false); -- Unlock now | 694 sender:lock_read(false); -- Unlock now |
695 sender_locked = nil; | 695 sender_locked = nil; |
696 end | 696 end |
697 end | 697 end |
698 | 698 |
699 local _readbuffer = sender.readbuffer; | 699 local _readbuffer = sender.readbuffer; |
700 function sender.readbuffer() | 700 function sender.readbuffer() |
701 _readbuffer(); | 701 _readbuffer(); |
702 if not sender_locked and receiver.bufferlen() >= buffersize then | 702 if not sender_locked and receiver.bufferlen() >= buffersize then |
703 sender_locked = true; | 703 sender_locked = true; |
967 return { | 967 return { |
968 _addtimer = addtimer, | 968 _addtimer = addtimer, |
969 | 969 |
970 addclient = addclient, | 970 addclient = addclient, |
971 wrapclient = wrapclient, | 971 wrapclient = wrapclient, |
972 | 972 |
973 loop = loop, | 973 loop = loop, |
974 link = link, | 974 link = link, |
975 step = step, | 975 step = step, |
976 stats = stats, | 976 stats = stats, |
977 closeall = closeall, | 977 closeall = closeall, |