Hi All / Mr. Alan
I used example "amqp_sendstring.c" to send the simple word "Hello World" to my rabbitmq server. And I got the problem when login, it is response "socket is closed".
I used C# code with example "Send.cs" and successed, meaning my server is no problem.
I am sr for my stupidity with C.
I checked step by step:
//A TCP socket connection. Create a new TCP socket.
socket = amqp_tcp_socket_new(conn);
if (!socket) {
die("creating TCP socket");
}
>> nothing happen here.
//Open a socket connection.
status = amqp_socket_open(socket, hostname, port);
if (status) {
die("opening TCP socket");
}
>> Result: Displayed : opening TCP socket in my ternimal
//Login to the broker
die_on_amqp_error(amqp_login(conn, "/", 0, 131072, 0, AMQP_SASL_METHOD_PLAIN,
"guest", "guest"),
"Logging in");
>> Result: Displayed : Logging in : socket is closed
Seem the program end here. The next step can't be reached.
I am try "google search" but I am still not understand. What's happening? How to solve this problem.
Thank for help!
Regards