Welcome Guest ( Log In | Register )

> Access AMIP socket server from *nix
uplate
post 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
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
 
Reply to this topicStart new topic
Replies
uplate
post 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
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Posts in this topic
uplate   Access AMIP socket server from *nix   Oct 10 2007, 02:03 AM
Serge   AMIP uses specific protocol, application which con...   Oct 10 2007, 09:01 AM
uplate   ::phew::..finally got boost/asio/rcf compiled and ...   Oct 15 2007, 12:40 PM
uplate   OK, so I've tried writing a basic program to p...   Oct 15 2007, 11:39 PM
Serge   AMIP on Windows is not using ASIO for RCF, but the...   Oct 15 2007, 11:43 PM
uplate   Thank you for looking into this for me. I could he...   Oct 16 2007, 12:18 AM
Serge   Here is AMIP compiled with RCF 0.9: gen_irc.dll. R...   Oct 16 2007, 10:22 AM
uplate   IT WORKED! [uplate@~/devel/src/amip-clie...   Oct 16 2007, 11:53 PM
uplate   ive been working on an irssi module, and it's ...   Oct 20 2007, 02:20 AM
Serge   Looks nice, thanks for your efforts.   Oct 20 2007, 11:27 AM
uplate   Here's another picture. Looking at the IDL, I...   Oct 21 2007, 02:22 AM
Serge   Using listeners is a bit complicated and requires ...   Oct 21 2007, 11:35 AM
uplate   thanks for the information, and the source has bee...   Oct 24 2007, 01:51 AM
uplate   Hey again, so i'm a little stuck trying to i...   Nov 2 2007, 01:36 AM
uplate   Hey Serge, Ignore the last email, it was a probl...   Nov 3 2007, 02:56 AM
uplate   Was a bug in RCF, author gave me a fix. Now I have...   Nov 3 2007, 05:28 AM
uplate   Implemented ClientService mechanism as an irssi pl...   Nov 4 2007, 05:24 PM
uplate   Now have most of the major functionality of the AM...   Nov 27 2007, 03:06 AM
Serge   I don't mind, please feel free to release it.   Nov 27 2007, 08:12 AM
uplate   Is it OK if I include the gen_irc.dll *compiled wi...   Dec 22 2007, 05:46 PM
Serge   You'd better give a link, since AMIP should be...   Dec 22 2007, 07:34 PM
uplate   Good point, thanks.   Dec 22 2007, 07:49 PM
uplate   OK, first version is released. I won't use thi...   Dec 23 2007, 01:10 AM
uplate   Hey Serge, I noticed the link to the specially com...   Dec 31 2007, 09:42 PM
Serge   2.63 test is available at http://amip.tools-for.ne...   Jan 1 2008, 09:12 PM
uplate   Ah, nice, works great! Thanks, Max   Jan 1 2008, 11:49 PM


Reply to this topicStart new topic
6 User(s) are reading this topic (6 Guests and 0 Anonymous Users)
0 Members: