Comments (4)
The option --reuse-port
corresponds to SO_REUSE_PORT
socket option, which is only meaningful for a listening socket. But I'll look to provide a way to change socket options before binding/connecting a client-side socket, if that could be helpful in your case.
from pipy.
@yyk808 In the latest commit cae1935 a new state 'open' is added to connect() filter's callback, where you can do setsockopt() right after a socket is open and before anything else, like:
var SOL_SOCKET = 1
var SO_REUSEPORT = 15
pipeline($=>$
.connect('x.x.x.x:nnn', {
onState: inb => {
if (inb.state === 'open') {
inb.socket.setRawOption(SOL_SOCKET, SO_REUSEPORT, new Data([1]))
}
}
})
)
from pipy.
@yyk808 The last change for adding an 'open'
state to an Outbound had a bug that caused a crash. The issue was just fixed in commit d36b333. You'll probably need an update as you use the onState
callback.
from pipy.
@yyk808 The last change for adding an
'open'
state to an Outbound had a bug that caused a crash. The issue was just fixed in commit d36b333. You'll probably need an update as you use theonState
callback.
Thank you very much! This helps a lot.
from pipy.
Related Issues (20)
- metrics label is not well handled in multi-threading version HOT 2
- pipy crash when visit admin-port HOT 1
- it seems pipyjs not implement JSON.parse(text, recevier?) ,recevier not work. HOT 4
- Can not access admin port with container HOT 2
- build.sh failing on Fedora 37 HOT 3
- support Option Configuration for LoadBalancer Object HOT 3
- whether it can be support javascript eval expression HOT 2
- support jsonpath tools for get value from json HOT 1
- admin-port visit not found HOT 3
- Use OpenSSL 3 HOT 2
- support php-fpm fastcgi protocol HOT 2
- where is benchmark HOT 6
- Pipy Repo REST API didn't work HOT 8
- Can't compile as dynamic library in linux. HOT 7
- Cannot build on macOS with silicon chip HOT 2
- [filter] manually bound `connect` doesn't close tcp socket cleanly. HOT 2
- [filter] Manually close the Inbound connection got the whole program terminated. HOT 1
- `bind` override `socket.setRawOption` HOT 3
- Support for SM2 Certificates HOT 2
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 pipy.