The IPs should match - you connect from one to the other (so you bind on one, connect to that one from the other). I would definitely recommend working through the guide a little to get the basic concepts down: http://zguide.zeromq.org
Ian On Mon, Jul 1, 2013 at 9:05 PM, ashwini ramamurthy <[email protected]>wrote: > Thanks edwin, yes 11.22.6.143 is the servers ip address. > > // in the client > ZMQ.Socket s = context.socket(ZMQ.REQ); > s.connect("tcp://11.22.6.142:8080"); > > I used the ping and dns app in android to see if i could ping the other > device. I am able to ping with the above ip address but my app is not able > to send messages . I still havent figured about whats wrong. > > Thanks, > Ashwini > > > On Mon, Jul 1, 2013 at 3:55 PM, Edwin van den Oetelaar <[email protected] > > wrote: > >> If I read the docs correctly, you do not need to bind (the server) to a >> specific IP address. >> tcp://*:8080 >> You can bind to all interfaces and all adresses at once on a specific >> port number. >> >> Then you connect() to the IP address of the OTHER side (not your own, so >> the client connects to the server IP:port) >> This is the normal way TCP servers/clients operate. >> >> Good luck, >> Edwin van den Oetelaar >> >> >> On Mon, Jul 1, 2013 at 7:42 PM, Ashwini <[email protected]> wrote: >> >>> Oh,is it ? But the client and server are in 2 different devices so they >>> have different ip addresses . I thought the Port number should be the same >>> not the IP address . >>> >>> >>> >>> On 01-Jul-2013, at 1:12 PM, Shon Love <[email protected]> wrote: >>> >>> Hey, >>> >>> I believe the address in the connect call should match the address in >>> the bind call. >>> >>> Thanks, >>> Shon >>> >>> >>> On Mon, Jul 1, 2013 at 9:30 AM, ashwini ramamurthy < >>> [email protected]> wrote: >>> >>>> Thanks for the link . I went through it . I have done something very >>>> similar. >>>> As this is just a test app i have fixed the ip address i.e ip is not >>>> given by the user. I am using the req-reply pattern where i have one client >>>> and one server. Both the devices are connected to the same wifi . I have >>>> obtained the ip address from the phone and used that to connect. >>>> But still i don't see any messages being received by the server. I >>>> don't know where i am going wrong and what i am missing. >>>> >>>> Below is the code used to connect >>>> >>>> // in the server >>>> ZMQ.Socket socket = context.socket(ZMQ.REP); >>>> socket.bind("tcp://11.22.6.161:8080");// in the client >>>> ZMQ.Socket s = context.socket(ZMQ.REQ); >>>> s.connect("tcp://11.22.6.142:8080"); >>>> >>>> >>>> Any tips or suggestions would be really helpful. >>>> >>>> Thanks, >>>> Ashwini >>>> >>>> >>>> On Mon, Jul 1, 2013 at 12:04 AM, shancat <[email protected]>wrote: >>>> >>>>> Check out https://github.com/eggerdo/ZmqVideoChat >>>>> On Jul 1, 2013 2:02 PM, "ashwini ramamurthy" <[email protected]> >>>>> wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> I wanted 2 android apps in different devices to communicate using >>>>>> zeromq. Both the devices will be in the same network and connected to the >>>>>> same wifi . I went through the guide :chapter 8 but im still unsure how >>>>>> to >>>>>> go about it. Any ideas, tips would be really helpful. >>>>>> >>>>>> Thanks, >>>>>> Ashwini >>>>>> >>>>>> _______________________________________________ >>>>>> zeromq-dev mailing list >>>>>> [email protected] >>>>>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >>>>>> >>>>>> >>>>> _______________________________________________ >>>>> zeromq-dev mailing list >>>>> [email protected] >>>>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >>>>> >>>>> >>>> >>>> _______________________________________________ >>>> zeromq-dev mailing list >>>> [email protected] >>>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >>>> >>>> >>> >>> >>> -- >>> Shon C. Love >>> Programmer >>> >>> _______________________________________________ >>> zeromq-dev mailing list >>> [email protected] >>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >>> >>> >>> _______________________________________________ >>> zeromq-dev mailing list >>> [email protected] >>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >>> >>> >> >> _______________________________________________ >> zeromq-dev mailing list >> [email protected] >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> >> > > _______________________________________________ > zeromq-dev mailing list > [email protected] > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > >
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
