Access AMIP socket server from *nix |
Access AMIP socket server from *nix |
uplate |
Oct 10 2007, 02:03 AM
Post
#1
|
Member Group: Members Posts: 21 Joined: 10-October 07 Member No.: 391 |
Hi, I am interested in trying to access AMIP from *nix. It appears that AMIP server creates a TCP socket connection that should be able to be accessed remotely. Can you give some indication on how this could be done?
I've tried with socket and telnet, but both indicate that the AMIP hosting machine refuses the connection. My setup: [WIN] AMIP Server:40581 [NIX] Client access: `telnet WIN 40581` `socket WIN 40581` Thanks |
uplate |
Nov 3 2007, 02:56 AM
Post
#2
|
Member Group: Members Posts: 21 Joined: 10-October 07 Member No.: 391 |
Hey Serge,
Ignore the last email, it was a problem of needing to have the libs and source built with BOOST_ASIO. I got that solved, and now I have a 95% working server program. Using the code I listed above, I now get the following when I run the following test program: CODE /* * C++ headers */ #include <RCF/ClientStub.hpp> #include <RCF/Idl.hpp> #include <RCF/RcfServer.hpp> #include <RCF/TcpEndpoint.hpp> #include <SF/vector.hpp> #include <iostream> /* AMIP IDLs */ #include "amip/MyService.hpp" #include "amip/ClientService.hpp" /* * C headers */ #ifdef __cplusplus extern "C" { #include <unistd.h> } #endif int main() { RcfClient<ClientService> server_test(RCF::TcpEndpoint("localhost", 60334)); server_test.exec("hello"); return 0; } Run server program, followed by above test. CODE [uplate@~/devel/src/narc/src]> ./narcserver Got exec However, when I try change a song in AMIP, the server program does not respond. This confuses me, because before, when I had a server program built without ASIO, the server program would segfault when I changed a song in AMIP. Now it seems as if the server program does not even get a connection from AMIP. It is clear to me that, in the case where the server program runs without ASIO, it binds to *:60334, whereas when I compile with ASIO, it binds to 127.0.0.1:60334, regardless of what I set "host" to in RCF::TcpEndpoint. I have verified this by running `sockstat -l4` in either case. I realize that this appears to be an RCF issue, but I thought I'd post it here for the benefit of anyone else trying this stuff out, or in case you'd encountered anything like this. Max |