Re: [Simpleweb-Support] Unable to get the remote client port
Brought to you by:
niallg
From: Jerome L. <co...@no...> - 2006-12-21 18:34:39
|
Great, that worked perfectly! I didn't expect the request to share the = same attributes as the pipeline. I'm looking forward to the next release! Best regards, Jerome =20 > -----Message d'origine----- > De : sim...@li...=20 > [mailto:sim...@li...] De=20 > la part de Niall Gallagher > Envoy=E9 : jeudi 21 d=E9cembre 2006 18:37 > =C0 : Simple support and user issues > Objet : Re: [Simpleweb-Support] Unable to get the remote client port >=20 > Hi, >=20 > If you use=20 > Request.getAttribute(MyConstants.SOCKET_IDENTIFIER) you will=20 > get the socket. I hope to be able to release the next version=20 > in a month or two, as I am still refactoring/implementing a=20 > few things.=20 > =20 > Niall Gallagher >=20 > ----- Original Message ---- > From: Jerome Louvel <co...@no...> > To: Simple support and user issues=20 > <sim...@li...> > Sent: Thursday, December 21, 2006 5:21:01 PM > Subject: Re: [Simpleweb-Support] Unable to get the remote client port >=20 >=20 > Hi Niall, >=20 > Thanks for the code snippet. I created a subclass of=20 > BufferedPipelineFactory > where I was able to set the socket as an attribute to the=20 > pipeline (using a > put() method).=20 >=20 > Now I don't know how to get the pipeline used to serve a=20 > request. Any idea? >=20 > BTW, when do you plan to release the next version of Simple?=20 >=20 > Best regards, > Jerome =20 >=20 > > -----Message d'origine----- > > De : sim...@li...=20 > > [mailto:sim...@li...] De=20 > > la part de Niall Gallagher > > Envoy=E9 : jeudi 21 d=E9cembre 2006 17:16 > > =C0 : Simple support and user issues > > Objet : Re: [Simpleweb-Support] Unable to get the remote client port > >=20 > > Hi Jerome, > >=20 > > The way you can do this is by creating a PipelineFactory.=20 > > This can be added to the connection you create. For an=20 > > example look at the BufferedPipelineFactory. Here you can=20 > > create a pipeline, and add the socket as an attribute. For example. > >=20 > > public class MyPipelineFactory implements PipelineFactory { > > public Pipline getPipeline(Socket sock) { > > Pipeline pipe =3D new BufferedPipeline(sock); > > pipe.set(MyConstants.SOCKET_IDENTIFIER, sock); > > return pipe; > > } > > } > >=20 > > I have been thinking of adding a way to get the client port=20 > > to the request without the need for a pipeline factory as it=20 > > has been requested before. Perhaps in the next release which=20 > > already contains quite a few new features. > > =20 > > Niall Gallagher > >=20 > > ----- Original Message ---- > > From: Jerome Louvel <co...@no...> > > To: sim...@li... > > Sent: Thursday, December 21, 2006 3:45:41 PM > > Subject: [Simpleweb-Support] Unable to get the remote client port > >=20 > >=20 > > Hi, > >=20 > > I have to get the remote client port number in order to=20 > > implement the IDENT > > protocol. I couldn't find a way to get this information=20 > from a Request > > instance. I can't even cast it to a MonitoredRequest in order=20 > > to access to > > the internal socket. > >=20 > > Could it be possible to extend the Request interface with=20 > > this property? > >=20 > > Best regards, > > Jerome Louvel > > -- > > http://www.restlet.org > >=20 > >=20 > > -------------------------------------------------------------- > > ----------- > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the=20 > > chance to share your > > opinions on IT & business topics through brief surveys -=20 > and earn cash > > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge > > &CID=3DDEVDEV > > _______________________________________________ > > Simpleweb-Support mailing list > > Sim...@li... > > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > >=20 > >=20 > >=20 > >=20 > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam protection around=20 > > http://mail.yahoo.com=20 > >=20 > > -------------------------------------------------------------- > > ----------- > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the=20 > > chance to share your > > opinions on IT & business topics through brief surveys -=20 > and earn cash > > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge > > &CID=3DDEVDEV > > _______________________________________________ > > Simpleweb-Support mailing list > > Sim...@li... > > https://lists.sourceforge.net/lists/listinfo/simpleweb-support >=20 >=20 > -------------------------------------------------------------- > ----------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the=20 > chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge &CID=3DDEVDEV > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support >=20 >=20 >=20 >=20 > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around=20 > http://mail.yahoo.com=20 >=20 > -------------------------------------------------------------- > ----------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the=20 > chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge &CID=3DDEVDEV > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support |