We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to have one udp and one tcp server? I want to make discovering of ESP by UDP, and make data transferring by TCP
uart.setup(0,9600,8,0,1) print("Start ESP8266") wifi.setmode(wifi.STATION) wifi.sta.config("essid","password") wifi.sta.connect() tmr.alarm(0, 1000, 1, function() if wifi.sta.getip() == nil then print("Connecting to AP...") else print('IP: ',wifi.sta.getip()) registerServer() tmr.stop(0) end end) function registerServer() if srv ~= nil then srv:close() end if srv2 ~= nil then srv2:close() end print("before create server") srv = net.createServer(net.UDP) srv:on("receive", function(socket, request) print(request) socket.close() end) srv:listen(33249) srv2 = net.createServer(net.TCP) srv2:listen(33248,function(conn) conn:on("receive",function(socket,request) print( request ) socket.close() end) conn:on("sent",function(conn) conn:close() end) end) end
The text was updated successfully, but these errors were encountered:
Hi, please refer to #1080 where your question is addressed
Sorry, something went wrong.
Is it possible to have one udp and one tcp server?
Yes. For further user support consider #1010.
No branches or pull requests
Is it possible to have one udp and one tcp server?
I want to make discovering of ESP by UDP, and make data transferring by TCP
The text was updated successfully, but these errors were encountered: