Discussion:
[asio-users] looking for a self connecting async server
Goran
2012-09-04 11:42:45 UTC
Permalink
Hi all,

I took a look into
http://www.boost.org/doc/libs/1_51_0/doc/html/boost_asio/example/echo/async_tcp_echo_server.cpp
which I understand so far.

Now I'm trying to edit the example above to somewhat of a "self
connecting server". The usage should be like this:

server <port> <remote ip> <remote port>

E.g.:

server 1111 192.168.0.1 1111

Are there any examples for such a scenario? Or any hints how to edit
the example above?

Thanks in advance!
Goran
Guilherme Namen
2012-09-04 11:50:25 UTC
Permalink
Is better for you create a child process and use some inter process
communication like pipe or unix socket.
Post by Goran
Hi all,
I took a look into
http://www.boost.org/doc/libs/1_51_0/doc/html/boost_asio/example/echo/async_tcp_echo_server.cpp
which I understand so far.
Now I'm trying to edit the example above to somewhat of a "self
server <port> <remote ip> <remote port>
server 1111 192.168.0.1 1111
Are there any examples for such a scenario? Or any hints how to edit
the example above?
Thanks in advance!
Goran
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
asio-users mailing list
https://lists.sourceforge.net/lists/listinfo/asio-users
_______________________________________________
Using Asio? List your project at
http://think-async.com/Asio/WhoIsUsingAsio
Goran
2012-09-04 11:54:30 UTC
Permalink
What if the binary is on two machines? E.g. localhost != 192.168.0.1
in my example below.

On Tue, Sep 4, 2012 at 1:50 PM, Guilherme Namen
Post by Guilherme Namen
Is better for you create a child process and use some inter process
communication like pipe or unix socket.
Post by Goran
Hi all,
I took a look into
http://www.boost.org/doc/libs/1_51_0/doc/html/boost_asio/example/echo/async_tcp_echo_server.cpp
which I understand so far.
Now I'm trying to edit the example above to somewhat of a "self
server <port> <remote ip> <remote port>
server 1111 192.168.0.1 1111
Are there any examples for such a scenario? Or any hints how to edit
the example above?
Thanks in advance!
Goran
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
asio-users mailing list
https://lists.sourceforge.net/lists/listinfo/asio-users
_______________________________________________
Using Asio? List your project at
http://think-async.com/Asio/WhoIsUsingAsio
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
asio-users mailing list
https://lists.sourceforge.net/lists/listinfo/asio-users
_______________________________________________
Using Asio? List your project at
http://think-async.com/Asio/WhoIsUsingAsio
Goran
2012-09-04 11:58:57 UTC
Permalink
Maybe my first post has not been correct (I'm quite new to asio). I
digged around and found this post:

http://stackoverflow.com/questions/4381792/c-boost-tcp-serialized-objects-on-channel-bidirectional-communication-does-no

This is something like I need but still not enough information for my skills.
Post by Goran
What if the binary is on two machines? E.g. localhost != 192.168.0.1
in my example below.
On Tue, Sep 4, 2012 at 1:50 PM, Guilherme Namen
Post by Guilherme Namen
Is better for you create a child process and use some inter process
communication like pipe or unix socket.
Post by Goran
Hi all,
I took a look into
http://www.boost.org/doc/libs/1_51_0/doc/html/boost_asio/example/echo/async_tcp_echo_server.cpp
which I understand so far.
Now I'm trying to edit the example above to somewhat of a "self
server <port> <remote ip> <remote port>
server 1111 192.168.0.1 1111
Are there any examples for such a scenario? Or any hints how to edit
the example above?
Thanks in advance!
Goran
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
asio-users mailing list
https://lists.sourceforge.net/lists/listinfo/asio-users
_______________________________________________
Using Asio? List your project at
http://think-async.com/Asio/WhoIsUsingAsio
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
asio-users mailing list
https://lists.sourceforge.net/lists/listinfo/asio-users
_______________________________________________
Using Asio? List your project at
http://think-async.com/Asio/WhoIsUsingAsio
Marat Abrarov
2012-09-04 11:59:00 UTC
Permalink
Hi, Goran.
Post by Goran
Now I'm trying to edit the example above to somewhat of a "self
server <port> <remote ip> <remote port>
May be it can be achieved by combining chat_server with chat_client (one of the most interesting Asio example):
http://www.boost.org/doc/libs/1_51_0/doc/html/boost_asio/examples.html ?

Regards,
Marat Abrarov.
Guilherme Namen
2012-09-04 12:04:02 UTC
Permalink
I think that serialization example is the way for you.
http://www.boost.org/doc/libs/1_51_0/doc/html/boost_asio/examples.html
Post by Marat Abrarov
Hi, Goran.
Post by Goran
Now I'm trying to edit the example above to somewhat of a "self
server <port> <remote ip> <remote port>
http://www.boost.org/doc/libs/1_51_0/doc/html/boost_asio/examples.html ?
Regards,
Marat Abrarov.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
asio-users mailing list
https://lists.sourceforge.net/lists/listinfo/asio-users
_______________________________________________
Using Asio? List your project at
http://think-async.com/Asio/WhoIsUsingAsio
Guilherme Namen
2012-09-04 12:06:10 UTC
Permalink
But if you are going to use a huge complex object serialization over
network i suggest CORBA. There are many CORBA implementations.
Post by Guilherme Namen
I think that serialization example is the way for you.
http://www.boost.org/doc/libs/1_51_0/doc/html/boost_asio/examples.html
Post by Marat Abrarov
Hi, Goran.
Post by Goran
Now I'm trying to edit the example above to somewhat of a "self
server <port> <remote ip> <remote port>
http://www.boost.org/doc/libs/1_51_0/doc/html/boost_asio/examples.html ?
Regards,
Marat Abrarov.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
asio-users mailing list
https://lists.sourceforge.net/lists/listinfo/asio-users
_______________________________________________
Using Asio? List your project at
http://think-async.com/Asio/WhoIsUsingAsio
Marat Abrarov
2012-09-04 12:03:45 UTC
Permalink
May be https://github.com/boostcon/2011_presentations/raw/master/mon/thinking_asynchronously.pdf can help (there is an
example of proxy in that presentation).

Regards,
Marat Abrarov.
Loading...