Comments (5)
@clue As far as I can tell all Layer 4 protocols have a source and target port. How about adding a OsiLayer4ConnectionInterface
for those? That would be a relatively simple extension and OSI layers are pretty well defined.
from socket.
C_a.remoteAddress = C_b.localAddress and C_a.localAddress = C_b.remoteAddress
I think this makes sense 👍 Though I'm not sure what you're suggesting we need to do? :)
When multiple connections are managed, both inbound and outbound, we need to "know" where the connection came from to decide which party we are (local or remote).
I'm not sure I follow, can you elaborate on this? You usually hold a reference to an instance representing the connection, so how exactly can these be mixed up?
How about adding a
OsiLayer4ConnectionInterface
[…]
Care to elaborate on this? What's the motivation for this interface? What does this interface do that the ConnectionInterface
is not capable of?
from socket.
I'd like to have a getSourceAddress
and getTargetAddress
although when thinking about it more, for unix sockets it could be argued that there is no real source address...
I'm not sure I follow, can you elaborate on this? You usually hold a reference to an instance representing the connection, so how exactly can these be mixed up?
I guess it depends on if you use the connection instance passed in the callback or the one you stored upon connection initiation.
Care to elaborate on this? What's the motivation for this interface? What does this interface do that the ConnectionInterface is not capable of?
It could expose things like the port which are part of the OSI 4 layer (afaik).
from socket.
I'm not sure I follow, can you elaborate on this? You usually hold a reference to an instance representing the connection, so how exactly can these be mixed up?
I guess it depends on if you use the connection instance passed in the callback or the one you stored upon connection initiation.
I'm still not sure I follow. Incoming and outgoing connections use different classes, as they're from different components. Using instanceof
is much more reliable than checking the addresses (e.g. think of connections to localhost).
It could expose things like the port which are part of the OSI 4 layer (afaik).
You've got me confused, are we talking about #26 here? :-) If so, let's please move the discussion into a single ticket.
from socket.
Ok.
from socket.
Related Issues (20)
- Keep tcp connection alive HOT 2
- Certificates using mkcet fail handshake HOT 4
- Additional suggestion HOT 2
- Get write response HOT 2
- Problem with DNS request in socket connector HOT 3
- Socket server need to restart on day start HOT 11
- verify_peer should default to false for React\Socket\Server using TLS context HOT 1
- TcpConnector - are writes buffered or sent immediately? HOT 10
- Listening multiple socket chanels on the same server HOT 2
- Write never send data HOT 2
- Failed tests with OpenSSL 3 HOT 5
- EventBase::loop(): kevent: Bad file descriptor HOT 6
- [Security] Response size limitation HOT 2
- [v1.11.0] Accessing array offset on null value - Failed TCP connection without ext-sockets HOT 2
- How to handle socket connection on Server HOT 4
- Interactive client example? HOT 2
- How to deploy the server? HOT 1
- New to reactphp : I think my problem is easy for you HOT 3
- Memory leak in TcpServer due to PHP stream_context_create memory leak HOT 5
- Roadmap to reactphp/socket v3
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 socket.