red5 , get Referrer : comment obtenir l’adresse IP ?

 

Comment connaître l’adresse IP d’un connecté vers une application red5 ?

 

public boolean appConnect( IConnection conn , Object[] params ){
    Map properties = conn.getConnectParams();
    String ip = (String)conn.getRemoteAddress( );
    String agent = (String)properties.get( "flashVer" );
    String referrer = (String)properties.get( "swfUrl" );
    log.info("*appConnect ip="+ip+" agent="+agent+"referrer="+referrer);
(....)
Partager:
  • Facebook
  • Print
  • Google Bookmarks
  • Digg
  • Yahoo! Bookmarks
  • del.icio.us
  • Live
  • LinkedIn

1 Comments

  1. olivier says:

    Pour faire de la programmation plus propre, un conseil : déclare un morceau de code d’initialisation “static” pour être lancé dès le début :

    public class Application extends ApplicationAdapter {

    protected static Logger log = LoggerFactory.getLogger(Application.class);

    // on veut l’initialization dès le début => static :
    static {
    try {
    Class.forName(”com.mysql.jdbc.Driver”);
    }
    catch ( ClassNotFoundException exception ) {
    log.error( “ClassNotFoundException ” exception.getMessage( ) );
    }
    }

    public String sayHello(Object[] params){
    blabla…
    }

0 Trackbacks


Fatal error: Call to undefined function comment_form() in /homez.59/proxymis/www/blog/wp-content/themes/wp-perfect/comments.php on line 53