Connection not initializing on windows
Closed this issue · 4 comments
I implemented the onData function in my version of the ConnectionHandler to send data via tcp to the AMQP interface socket. When I run the program, onData gets called with "AMQP" as the data, which is then sent to the socket. I can see a Connection.Start AMQP call via wireshark, but from there nothing is happening. When I look at the logs, the AMQP connection is attempting to start but times out after 10 seconds with the message {handshake timeout, frame_header}. It's as if the handshake is just never being completed. From what I could find, it doesn't seem like anyone else has encountered this error.
Also, when I start the program, there is a spike under 'Connection Operations' on the RabbitMQ web interface, so it seems like it's at least trying to connect.
I have not implemented an event loop, as I wasn't sure if this was necessary...
The logs when I try to run the program:
2022-11-17 12:30:43.638000-05:00 [info] <0.3309.0> accepting AMQP connection <0.3309.0> (127.0.0.1:61487 -> 127.0.0.1:5672)
2022-11-17 12:30:53.641000-05:00 [error] <0.3309.0> closing AMQP connection <0.3309.0> (127.0.0.1:61487 -> 127.0.0.1:5672):
2022-11-17 12:30:53.641000-05:00 [error] <0.3309.0> {handshake_timeout,frame_header}
You need an event loop, read the data from the socket when the socket becomes readable, and pass that data to the AMQP::Connection class.
Hello,I have the same problem.And I read from socket many times,but I can't read anything from socket.Do you solve this problem?
Can you show the smallest possible example program without threads that exposes this problem?
Can you show the smallest possible example program without threads that exposes this problem?
oh,I have give up using the library on Windwos,and I will use it on linux through asio.I think it is more convenient.Thanks.