Client ip address

15 views
Skip to first unread message

okouser okouser

unread,
Apr 25, 2013, 2:56:09 PM4/25/13
to myproje...@googlegroups.com
How get ip address of connected client in rtmp.py?

Intencity Team

unread,
Apr 30, 2013, 5:15:41 PM4/30/13
to myproje...@googlegroups.com, oko...@gmail.com
Hi,

One way to get the client IP address in rtmp.py is as follows.

In App class' onConnect method use
client.stream.sock.getpeername()
It should be of the form ("192.1.2.3", 1627) giving remote IP address
port number.

The "sock" object is Python socket http://docs.python.org/2/library/socket.html

At other places if you have a reference to the client object then you
can access the "sock" as above.

Hope this helps.

On Thu, Apr 25, 2013 at 11:56 AM, okouser okouser <oko...@gmail.com> wrote:
> How get ip address of connected client in rtmp.py?
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "myprojectguide" group.
> To post to this group, send email to myproje...@googlegroups.com
> To unsubscribe from this group, send email to
> myprojectguid...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/myprojectguide?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "myprojectguide" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to myprojectguid...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



--
The Intencity Team http://theintencity.com
Reply all
Reply to author
Forward
0 new messages