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.

Listening port of Logic Machine
#1
Hi,

Our customer has a software. This software is sending some informations to 4033 port of our Logic Machine. For logging , i write such as code but all i got is 'Nil' value. Can you check my code please or any suggestion ?


require('socket')

ip = 'localhost'


sock = socket.tcp()
sock : settimeout(3)

res, err = sock:connect(ip, 4003)

log(res)

sock:close()
Reply
#2
Your code is TCP client connecting to non-existing local port. Here's an example of TCP server: https://openrb.com/example-lm2-as-tcp-se...-requests/
Reply


Forum Jump: