Comments (6)
The end
event on the $conn
object is called directly after executing the netcat command.
from socket.
BTW this is the perl code which I try to use: https://github.com/stevenshiau/clonezilla/blob/master/bin/ocs-socket by issuing ocs-socket -h ip -p 6461 -m test
. This doesnβt works the first time, but it does the second time.
from socket.
I think I found the problem: http://stackoverflow.com/questions/15163778/perl-tcp-client-does-not-display-incoming-data & http://stackoverflow.com/questions/993217/php-to-perl-socket-communication.
React is waiting for a full line, but per/netcat doesn't send it. However simply sending "\n" doesn't works.
from socket.
:fireworks: just looked at it again, and my assumption in the last post was correct, in the code I fetched via composer there is this:
if ('' === $data || false === $data || feof($stream)) {
Which checks if there is and end of file before emitting the data.
However in this code repo there is this line https://github.com/reactphp/socket/blob/master/src/Connection.php#L14
Which works perfect π. So the problem was I was using and old ratchet/react version.....
from socket.
@LEDfan Was it a typo in your composer.json (version constraint) or does the latest version which is provided by composer/packagist not contain the correct line?
from socket.
@staabm I first had:
"require": {
"cboden/Ratchet": "0.3.*",
"react/zmq": "0.2.*",
"phpseclib/phpseclib": "2.0.*@dev"
}
Now I have:
"require": {
"cboden/ratchet": "0.3.*",
"react/zmq": "0.3.*",
"phpseclib/phpseclib": "0.3.*"
}
from socket.
Related Issues (20)
- Ignoring exceptions from HappyEyeBallsConnectionBuilder::resolve HOT 2
- 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
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.