Software /
code /
prosody
Diff
net/server_event.lua @ 2121:3a5ed91a9f27
net.server_event: Use conn property for send/receive instead of caching, fixes trying to use original socket after SSL-wrapping
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 22 Nov 2009 03:58:37 +0000 |
parent | 2120:93eae69fc121 |
child | 2122:dd1da05568e4 |
line wrap: on
line diff
--- a/net/server_event.lua Sun Nov 22 03:55:48 2009 +0000 +++ b/net/server_event.lua Sun Nov 22 03:58:37 2009 +0000 @@ -473,7 +473,7 @@ interface.eventwritetimeout = false end end - local succ, err, byte = interface.send( interface.conn, interface.writebuffer, 1, interface.writebufferlen ) + local succ, err, byte = interface.conn:send( interface.writebuffer, 1, interface.writebufferlen ) --vdebug( "write data:", interface.writebuffer, "error:", err, "part:", byte ) if succ then -- writing succesful interface.writebuffer = "" @@ -539,8 +539,8 @@ interface.eventreadtimeout = nil end end - local buffer, err, part = receive( client, pattern ) -- receive buffer with "pattern" --vdebug( "read data:", buffer, "error:", err, "part:", part ) + local buffer, err, part = interface.conn:receive( pattern ) -- receive buffer with "pattern" buffer = buffer or part or "" local len = string_len( buffer ) if len > cfg.MAX_READ_LENGTH then -- check buffer length