Re: [Simpleweb-Support] Unable to get the remote client port
Brought to you by:
niallg
From: Niall G. <gal...@ya...> - 2006-12-21 17:37:35
|
Hi,=0A=0AIf you use Request.getAttribute(MyConstants.SOCKET_IDENTIFIER) you= will get the socket. I hope to be able to release the next version in a mo= nth or two, as I am still refactoring/implementing a few things. =0A =0ANia= ll Gallagher=0A=0A----- Original Message ----=0AFrom: Jerome Louvel <contac= t...@no...>=0ATo: Simple support and user issues <simpleweb-support@list= s.sourceforge.net>=0ASent: Thursday, December 21, 2006 5:21:01 PM=0ASubject= : Re: [Simpleweb-Support] Unable to get the remote client port=0A=0A=0AHi N= iall,=0A=0AThanks for the code snippet. I created a subclass of BufferedPip= elineFactory=0Awhere I was able to set the socket as an attribute to the pi= peline (using a=0Aput() method). =0A=0ANow I don't know how to get the pipe= line used to serve a request. Any idea?=0A=0ABTW, when do you plan to relea= se the next version of Simple? =0A=0ABest regards,=0AJerome =0A=0A> -----M= essage d'origine-----=0A> De : sim...@li...urceforge.= net =0A> [mailto:sim...@li...] De =0A> l= a part de Niall Gallagher=0A> Envoy=E9 : jeudi 21 d=E9cembre 2006 17:16=0A>= =C0 : Simple support and user issues=0A> Objet : Re: [Simpleweb-Support] U= nable to get the remote client port=0A> =0A> Hi Jerome,=0A> =0A> The way yo= u can do this is by creating a PipelineFactory. =0A> This can be added to t= he connection you create. For an =0A> example look at the BufferedPipelineF= actory. Here you can =0A> create a pipeline, and add the socket as an attri= bute. For example.=0A> =0A> public class MyPipelineFactory implements Pipel= ineFactory {=0A> public Pipline getPipeline(Socket sock) {=0A> = Pipeline pipe =3D new BufferedPipeline(sock);=0A> pipe.set(MyConsta= nts.SOCKET_IDENTIFIER, sock);=0A> return pipe;=0A> }=0A> }=0A> = =0A> I have been thinking of adding a way to get the client port =0A> to th= e request without the need for a pipeline factory as it =0A> has been reque= sted before. Perhaps in the next release which =0A> already contains quite = a few new features.=0A> =0A> Niall Gallagher=0A> =0A> ----- Original Messa= ge ----=0A> From: Jerome Louvel <co...@no...>=0A> To: simpleweb-sup= po...@li...=0A> Sent: Thursday, December 21, 2006 3:45:41 PM= =0A> Subject: [Simpleweb-Support] Unable to get the remote client port=0A> = =0A> =0A> Hi,=0A> =0A> I have to get the remote client port number in order= to =0A> implement the IDENT=0A> protocol. I couldn't find a way to get thi= s information from a Request=0A> instance. I can't even cast it to a Monito= redRequest in order =0A> to access to=0A> the internal socket.=0A> =0A> Cou= ld it be possible to extend the Request interface with =0A> this property?= =0A> =0A> Best regards,=0A> Jerome Louvel=0A> --=0A> http://www.restlet.org= =0A> =0A> =0A> ------------------------------------------------------------= --=0A> -----------=0A> Take Surveys. Earn Cash. Influence the Future of IT= =0A> Join SourceForge.net's Techsay panel and you'll get the =0A> chance to= share your=0A> opinions on IT & business topics through brief surveys - an= d earn cash=0A> http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsour= ceforge=0A> &CID=3DDEVDEV=0A> _____________________________________________= __=0A> Simpleweb-Support mailing list=0A> Sim...@li...urcefor= ge.net=0A> https://lists.sourceforge.net/lists/listinfo/simpleweb-support= =0A> =0A> =0A> =0A> =0A> __________________________________________________= =0A> Do You Yahoo!?=0A> Tired of spam? Yahoo! Mail has the best spam prote= ction around =0A> http://mail.yahoo.com =0A> =0A> -------------------------= -------------------------------------=0A> -----------=0A> Take Surveys. Ear= n Cash. Influence the Future of IT=0A> Join SourceForge.net's Techsay panel= and you'll get the =0A> chance to share your=0A> opinions on IT & business= topics through brief surveys - and earn cash=0A> http://www.techsay.com/de= fault.php?page=3Djoin.php&p=3Dsourceforge=0A> &CID=3DDEVDEV=0A> ___________= ____________________________________=0A> Simpleweb-Support mailing list=0A>= Sim...@li...=0A> https://lists.sourceforge.net/= lists/listinfo/simpleweb-support=0A=0A=0A----------------------------------= ---------------------------------------=0ATake Surveys. Earn Cash. Influenc= e the Future of IT=0AJoin SourceForge.net's Techsay panel and you'll get th= e chance to share your=0Aopinions on IT & business topics through brief sur= veys - and earn cash=0Ahttp://www.techsay.com/default.php?page=3Djoin.php&p= =3Dsourceforge&CID=3DDEVDEV=0A_____________________________________________= __=0ASimpleweb-Support mailing list=0AS...@li...urceforge.n= et=0Ahttps://lists.sourceforge.net/lists/listinfo/simpleweb-support=0A=0A= =0A=0A=0A__________________________________________________=0ADo You Yahoo!= ?=0ATired of spam? Yahoo! Mail has the best spam protection around =0Ahttp= ://mail.yahoo.com |