Comments (5)
If you take a look at line 268 in that same file, it'll emit an 'error' event since the parameter "exception" will be truthy.
Besides, regardless if the handle is closing, it'll call callback function from 258 or 262.
Minimal sample code for a repro always helps more than just pointing at a line and say error.
from luvit.
Here we go the tcp-echo-client-simple.lua
slightly changed:
local net = require('net')
local client
client = net.createConnection(12345, '127.0.0.1', function (err)
if err then error(err) end
print("Connected...")
-- Send stdin to the server
process.stdin:on("data",function(data) -- or 'process.stdin:pipe(client)'
client:write(data)
end)
-- Send the server's response to stdout
client:on("data",function(data) -- or 'client:pipe(process.stdout)'
process.stdout:write(data)
end)
-- Error handler
client:on("error",function(err)
print("error: " .. err)
client:close()
end)
end)
No error message in case the target name not resolved or the port is not connected
Actually, there will be only client read errors being handled
from luvit.
Related Issues (20)
- Luvit's global ``print`` replacement (from ``deps/pretty-print``) fails when trying to pipe the output on Windows
- Discussion to consider integration of Roblox's recently open sourced Luau HOT 5
- `https-client` test failing HOT 3
- Version history table
- Support wolfssl or mbedtls?
- require module with non-existant modulepath results in infinite loop HOT 1
- Unix domain sockets HOT 2
- Apple M1 Mac, get error "curl: (22) The requested URL returned error: 404" HOT 2
- fs module does not propagate errors properly
- http server aborted on iSH alpine ios
- [process bomb] binary file recursive create process
- Consider adding a `SECURITY.md` file
- Requiring within a require disables luvit's require system HOT 4
- How to use module that's depended on luvit, uv, and env module in openresty context? HOT 1
- Question: basic http benchmark perform bad with built-in http module and http keep-alive set HOT 7
- Uncaught Error: [string "bundle:/deps/net.lua"]:139: attempt to call local 'callback' (a string value) HOT 2
- Losing accuracy at 64 bits. HOT 2
- Can't connect to TLSv1_2 server HOT 3
- "EACCES: permission denied" while installing on any non-root account, even through sudo. HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from luvit.