This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Data buffering
#6
Connection refused means that other socket end does not accept the connection. Single local UDP socket should not block anything, check your other scripts.

If you are using send() in resident script, you can change the code to close the socket after each send (this is done automatically when script ends, so it will work properly for event scripts with older code). Otherwise it might lead to "No file descriptors available" error when too many sockets are open (>1024).

Code:
function send(cmd)
  local sock = require('socket').udp()
  if sock then
    sock:sendto(cmd, '127.0.0.1', 5432)
    sock:close()
  end
end
Reply


Messages In This Thread
Data buffering - by buuuudzik - 22.09.2016, 19:19
RE: Data buffering - by admin - 22.09.2016, 19:50
RE: Data buffering - by admin - 23.09.2016, 06:47
RE: Data buffering - by buuuudzik - 23.09.2016, 07:20
RE: Data buffering - by buuuudzik - 30.09.2016, 09:19
RE: Data buffering - by admin - 30.09.2016, 10:15
RE: Data buffering - by buuuudzik - 30.09.2016, 10:39
RE: Data buffering - by admin - 30.09.2016, 11:02
RE: Data buffering - by buuuudzik - 30.09.2016, 11:30
RE: Data buffering - by admin - 30.09.2016, 12:12
RE: Data buffering - by buuuudzik - 30.09.2016, 13:04

Forum Jump: