From samset at wanadoo.fr Thu Mar 19 18:08:54 2015 From: samset at wanadoo.fr (Samir Sow) Date: Thu, 19 Mar 2015 18:08:54 +0100 Subject: [99s-extend] cowboy websocket example runtime error Message-ID: Hi there, I would appreciate your help to understand the following error when running the websocket example. Context is : ERL 17 Cowboy 2.0.0-pre (master) no source modification =ERROR REPORT==== 19-Mar-2015::18:04:36 === Error in process <0.160.0> with exit value: {[{reason,{badarg,"Can't resolve the priv_dir of application websocket"}},{mfa,{cowboy_static,init,2}},{stacktrace,[{cowboy_static,priv_path,2,[{file,"src/cowboy_static.erl"},{line,66}]},{cowboy_static,init_opts,2,[{file? Thank you. Samir From essen at ninenines.eu Thu Mar 19 18:10:29 2015 From: essen at ninenines.eu (=?UTF-8?B?TG/Dr2MgSG9ndWlu?=) Date: Thu, 19 Mar 2015 18:10:29 +0100 Subject: [99s-extend] cowboy websocket example runtime error In-Reply-To: References: Message-ID: <550B0305.5080108@ninenines.eu> How do you run it? On 03/19/2015 06:08 PM, Samir Sow wrote: > Hi there, > > I would appreciate your help to understand the following error when running the websocket example. > > Context is : > > ERL 17 > Cowboy 2.0.0-pre (master) > no source modification > > > =ERROR REPORT==== 19-Mar-2015::18:04:36 === > Error in process <0.160.0> with exit value: {[{reason,{badarg,"Can't resolve the priv_dir of application websocket"}},{mfa,{cowboy_static,init,2}},{stacktrace,[{cowboy_static,priv_path,2,[{file,"src/cowboy_static.erl"},{line,66}]},{cowboy_static,init_opts,2,[{file? > > Thank you. > > Samir > _______________________________________________ > Extend mailing list > Extend at lists.ninenines.eu > https://lists.ninenines.eu/listinfo/extend > -- Lo?c Hoguin http://ninenines.eu From stephane at wirtel.be Thu Mar 19 18:10:58 2015 From: stephane at wirtel.be (=?utf-8?q?St=C3=A9phane?= Wirtel) Date: Thu, 19 Mar 2015 18:10:58 +0100 Subject: [99s-extend] cowboy websocket example runtime error In-Reply-To: References: Message-ID: do you have a priv/ directory in your application ? On 19 Mar 2015, at 18:08, Samir Sow wrote: > Hi there, > > I would appreciate your help to understand the following error when > running the websocket example. > > Context is : > > ERL 17 > Cowboy 2.0.0-pre (master) > no source modification > > > =ERROR REPORT==== 19-Mar-2015::18:04:36 === > Error in process <0.160.0> with exit value: {[{reason,{badarg,"Can't > resolve the priv_dir of application > websocket"}},{mfa,{cowboy_static,init,2}},{stacktrace,[{cowboy_static,priv_path,2,[{file,"src/cowboy_static.erl"},{line,66}]},{cowboy_static,init_opts,2,[{file? > > Thank you. > > Samir > _______________________________________________ > Extend mailing list > Extend at lists.ninenines.eu > https://lists.ninenines.eu/listinfo/extend -- St?phane Wirtel - http://wirtel.be - @matrixise From samset at wanadoo.fr Thu Mar 19 18:31:23 2015 From: samset at wanadoo.fr (Samir Sow) Date: Thu, 19 Mar 2015 18:31:23 +0100 Subject: [99s-extend] cowboy websocket example runtime error In-Reply-To: <550B0305.5080108@ninenines.eu> References: <550B0305.5080108@ninenines.eu> Message-ID: <2BC2405E-905C-4BE7-A579-61FC2AE3E737@wanadoo.fr> Manually from the application root dir. with exec erl Then starting all required applications Not very clever i admit but could not print debug info with _rel/bin/websocket Samir > On 19 mars 2015, at 18:10, Lo?c Hoguin wrote: > > How do you run it? > > On 03/19/2015 06:08 PM, Samir Sow wrote: >> Hi there, >> >> I would appreciate your help to understand the following error when running the websocket example. >> >> Context is : >> >> ERL 17 >> Cowboy 2.0.0-pre (master) >> no source modification >> >> >> =ERROR REPORT==== 19-Mar-2015::18:04:36 === >> Error in process <0.160.0> with exit value: {[{reason,{badarg,"Can't resolve the priv_dir of application websocket"}},{mfa,{cowboy_static,init,2}},{stacktrace,[{cowboy_static,priv_path,2,[{file,"src/cowboy_static.erl"},{line,66}]},{cowboy_static,init_opts,2,[{file? >> >> Thank you. >> >> Samir >> _______________________________________________ >> Extend mailing list >> Extend at lists.ninenines.eu >> https://lists.ninenines.eu/listinfo/extend >> > > -- > Lo?c Hoguin > http://ninenines.eu From essen at ninenines.eu Thu Mar 19 18:40:00 2015 From: essen at ninenines.eu (=?UTF-8?B?TG/Dr2MgSG9ndWlu?=) Date: Thu, 19 Mar 2015 18:40:00 +0100 Subject: [99s-extend] cowboy websocket example runtime error In-Reply-To: <2BC2405E-905C-4BE7-A579-61FC2AE3E737@wanadoo.fr> References: <550B0305.5080108@ninenines.eu> <2BC2405E-905C-4BE7-A579-61FC2AE3E737@wanadoo.fr> Message-ID: <550B09F0.9000907@ninenines.eu> If you don't use the release start script it can still work but you must define ERL_LIBS to let Erlang know where applications are located (-pa **ebin only says where *beams* are located). Maybe more things. On 03/19/2015 06:31 PM, Samir Sow wrote: > Manually from the application root dir. > with exec erl > Then starting all required applications > > Not very clever i admit but could not print debug info with _rel/bin/websocket > > Samir > > >> On 19 mars 2015, at 18:10, Lo?c Hoguin wrote: >> >> How do you run it? >> >> On 03/19/2015 06:08 PM, Samir Sow wrote: >>> Hi there, >>> >>> I would appreciate your help to understand the following error when running the websocket example. >>> >>> Context is : >>> >>> ERL 17 >>> Cowboy 2.0.0-pre (master) >>> no source modification >>> >>> >>> =ERROR REPORT==== 19-Mar-2015::18:04:36 === >>> Error in process <0.160.0> with exit value: {[{reason,{badarg,"Can't resolve the priv_dir of application websocket"}},{mfa,{cowboy_static,init,2}},{stacktrace,[{cowboy_static,priv_path,2,[{file,"src/cowboy_static.erl"},{line,66}]},{cowboy_static,init_opts,2,[{file? >>> >>> Thank you. >>> >>> Samir >>> _______________________________________________ >>> Extend mailing list >>> Extend at lists.ninenines.eu >>> https://lists.ninenines.eu/listinfo/extend >>> >> >> -- >> Lo?c Hoguin >> http://ninenines.eu > -- Lo?c Hoguin http://ninenines.eu From samset at wanadoo.fr Thu Mar 19 18:46:38 2015 From: samset at wanadoo.fr (Samir Sow) Date: Thu, 19 Mar 2015 18:46:38 +0100 Subject: [99s-extend] cowboy websocket example runtime error In-Reply-To: <550B09F0.9000907@ninenines.eu> References: <550B0305.5080108@ninenines.eu> <2BC2405E-905C-4BE7-A579-61FC2AE3E737@wanadoo.fr> <550B09F0.9000907@ninenines.eu> Message-ID: I?ve exported ERL_LIBS= before erl execution. but got same error ... > On 19 mars 2015, at 18:40, Lo?c Hoguin wrote: > > If you don't use the release start script it can still work but you must define ERL_LIBS to let Erlang know where applications are located (-pa **ebin only says where *beams* are located). > > Maybe more things. > > On 03/19/2015 06:31 PM, Samir Sow wrote: >> Manually from the application root dir. >> with exec erl >> Then starting all required applications >> >> Not very clever i admit but could not print debug info with _rel/bin/websocket >> >> Samir >> >> >>> On 19 mars 2015, at 18:10, Lo?c Hoguin wrote: >>> >>> How do you run it? >>> >>> On 03/19/2015 06:08 PM, Samir Sow wrote: >>>> Hi there, >>>> >>>> I would appreciate your help to understand the following error when running the websocket example. >>>> >>>> Context is : >>>> >>>> ERL 17 >>>> Cowboy 2.0.0-pre (master) >>>> no source modification >>>> >>>> >>>> =ERROR REPORT==== 19-Mar-2015::18:04:36 === >>>> Error in process <0.160.0> with exit value: {[{reason,{badarg,"Can't resolve the priv_dir of application websocket"}},{mfa,{cowboy_static,init,2}},{stacktrace,[{cowboy_static,priv_path,2,[{file,"src/cowboy_static.erl"},{line,66}]},{cowboy_static,init_opts,2,[{file? >>>> >>>> Thank you. >>>> >>>> Samir >>>> _______________________________________________ >>>> Extend mailing list >>>> Extend at lists.ninenines.eu >>>> https://lists.ninenines.eu/listinfo/extend >>>> >>> >>> -- >>> Lo?c Hoguin >>> http://ninenines.eu >> > > -- > Lo?c Hoguin > http://ninenines.eu From essen at ninenines.eu Thu Mar 19 18:56:09 2015 From: essen at ninenines.eu (=?UTF-8?B?TG/Dr2MgSG9ndWlu?=) Date: Thu, 19 Mar 2015 18:56:09 +0100 Subject: [99s-extend] cowboy websocket example runtime error In-Reply-To: References: <550B0305.5080108@ninenines.eu> <2BC2405E-905C-4BE7-A579-61FC2AE3E737@wanadoo.fr> <550B09F0.9000907@ninenines.eu> Message-ID: <550B0DB9.9030906@ninenines.eu> ERL_LIBS should point to the lib directory (where the application directories are), not to the root directory of the release. On 03/19/2015 06:46 PM, Samir Sow wrote: > I?ve exported ERL_LIBS= before erl execution. but got same error ... > > >> On 19 mars 2015, at 18:40, Lo?c Hoguin wrote: >> >> If you don't use the release start script it can still work but you must define ERL_LIBS to let Erlang know where applications are located (-pa **ebin only says where *beams* are located). >> >> Maybe more things. >> >> On 03/19/2015 06:31 PM, Samir Sow wrote: >>> Manually from the application root dir. >>> with exec erl >>> Then starting all required applications >>> >>> Not very clever i admit but could not print debug info with _rel/bin/websocket >>> >>> Samir >>> >>> >>>> On 19 mars 2015, at 18:10, Lo?c Hoguin wrote: >>>> >>>> How do you run it? >>>> >>>> On 03/19/2015 06:08 PM, Samir Sow wrote: >>>>> Hi there, >>>>> >>>>> I would appreciate your help to understand the following error when running the websocket example. >>>>> >>>>> Context is : >>>>> >>>>> ERL 17 >>>>> Cowboy 2.0.0-pre (master) >>>>> no source modification >>>>> >>>>> >>>>> =ERROR REPORT==== 19-Mar-2015::18:04:36 === >>>>> Error in process <0.160.0> with exit value: {[{reason,{badarg,"Can't resolve the priv_dir of application websocket"}},{mfa,{cowboy_static,init,2}},{stacktrace,[{cowboy_static,priv_path,2,[{file,"src/cowboy_static.erl"},{line,66}]},{cowboy_static,init_opts,2,[{file? >>>>> >>>>> Thank you. >>>>> >>>>> Samir >>>>> _______________________________________________ >>>>> Extend mailing list >>>>> Extend at lists.ninenines.eu >>>>> https://lists.ninenines.eu/listinfo/extend >>>>> >>>> >>>> -- >>>> Lo?c Hoguin >>>> http://ninenines.eu >>> >> >> -- >> Lo?c Hoguin >> http://ninenines.eu > -- Lo?c Hoguin http://ninenines.eu From samset at wanadoo.fr Thu Mar 19 19:01:38 2015 From: samset at wanadoo.fr (Samir Sow) Date: Thu, 19 Mar 2015 19:01:38 +0100 Subject: [99s-extend] cowboy websocket example runtime error In-Reply-To: <550B0DB9.9030906@ninenines.eu> References: <550B0305.5080108@ninenines.eu> <2BC2405E-905C-4BE7-A579-61FC2AE3E737@wanadoo.fr> <550B09F0.9000907@ninenines.eu> <550B0DB9.9030906@ninenines.eu> Message-ID: You mean where src, priv, ebin, deps ? are, right ? Samir > On 19 mars 2015, at 18:56, Lo?c Hoguin wrote: > > ERL_LIBS should point to the lib directory (where the application directories are), not to the root directory of the release. > > On 03/19/2015 06:46 PM, Samir Sow wrote: >> I?ve exported ERL_LIBS= before erl execution. but got same error ... >> >> >>> On 19 mars 2015, at 18:40, Lo?c Hoguin wrote: >>> >>> If you don't use the release start script it can still work but you must define ERL_LIBS to let Erlang know where applications are located (-pa **ebin only says where *beams* are located). >>> >>> Maybe more things. >>> >>> On 03/19/2015 06:31 PM, Samir Sow wrote: >>>> Manually from the application root dir. >>>> with exec erl >>>> Then starting all required applications >>>> >>>> Not very clever i admit but could not print debug info with _rel/bin/websocket >>>> >>>> Samir >>>> >>>> >>>>> On 19 mars 2015, at 18:10, Lo?c Hoguin wrote: >>>>> >>>>> How do you run it? >>>>> >>>>> On 03/19/2015 06:08 PM, Samir Sow wrote: >>>>>> Hi there, >>>>>> >>>>>> I would appreciate your help to understand the following error when running the websocket example. >>>>>> >>>>>> Context is : >>>>>> >>>>>> ERL 17 >>>>>> Cowboy 2.0.0-pre (master) >>>>>> no source modification >>>>>> >>>>>> >>>>>> =ERROR REPORT==== 19-Mar-2015::18:04:36 === >>>>>> Error in process <0.160.0> with exit value: {[{reason,{badarg,"Can't resolve the priv_dir of application websocket"}},{mfa,{cowboy_static,init,2}},{stacktrace,[{cowboy_static,priv_path,2,[{file,"src/cowboy_static.erl"},{line,66}]},{cowboy_static,init_opts,2,[{file? >>>>>> >>>>>> Thank you. >>>>>> >>>>>> Samir >>>>>> _______________________________________________ >>>>>> Extend mailing list >>>>>> Extend at lists.ninenines.eu >>>>>> https://lists.ninenines.eu/listinfo/extend >>>>>> >>>>> >>>>> -- >>>>> Lo?c Hoguin >>>>> http://ninenines.eu >>>> >>> >>> -- >>> Lo?c Hoguin >>> http://ninenines.eu >> > > -- > Lo?c Hoguin > http://ninenines.eu From essen at ninenines.eu Thu Mar 19 19:03:50 2015 From: essen at ninenines.eu (=?UTF-8?B?TG/Dr2MgSG9ndWlu?=) Date: Thu, 19 Mar 2015 19:03:50 +0100 Subject: [99s-extend] cowboy websocket example runtime error In-Reply-To: References: <550B0305.5080108@ninenines.eu> <2BC2405E-905C-4BE7-A579-61FC2AE3E737@wanadoo.fr> <550B09F0.9000907@ninenines.eu> <550B0DB9.9030906@ninenines.eu> Message-ID: <550B0F86.7080509@ninenines.eu> No. ERL_LIBS=_rel/hello_world_example/lib Or, ERL_LIBS=..:deps if you want the non-release version. Beware of what's in .. though (should be fine if you are in the examples folder). On 03/19/2015 07:01 PM, Samir Sow wrote: > You mean where src, priv, ebin, deps ? are, right ? > > Samir > >> On 19 mars 2015, at 18:56, Lo?c Hoguin wrote: >> >> ERL_LIBS should point to the lib directory (where the application directories are), not to the root directory of the release. >> >> On 03/19/2015 06:46 PM, Samir Sow wrote: >>> I?ve exported ERL_LIBS= before erl execution. but got same error ... >>> >>> >>>> On 19 mars 2015, at 18:40, Lo?c Hoguin wrote: >>>> >>>> If you don't use the release start script it can still work but you must define ERL_LIBS to let Erlang know where applications are located (-pa **ebin only says where *beams* are located). >>>> >>>> Maybe more things. >>>> >>>> On 03/19/2015 06:31 PM, Samir Sow wrote: >>>>> Manually from the application root dir. >>>>> with exec erl >>>>> Then starting all required applications >>>>> >>>>> Not very clever i admit but could not print debug info with _rel/bin/websocket >>>>> >>>>> Samir >>>>> >>>>> >>>>>> On 19 mars 2015, at 18:10, Lo?c Hoguin wrote: >>>>>> >>>>>> How do you run it? >>>>>> >>>>>> On 03/19/2015 06:08 PM, Samir Sow wrote: >>>>>>> Hi there, >>>>>>> >>>>>>> I would appreciate your help to understand the following error when running the websocket example. >>>>>>> >>>>>>> Context is : >>>>>>> >>>>>>> ERL 17 >>>>>>> Cowboy 2.0.0-pre (master) >>>>>>> no source modification >>>>>>> >>>>>>> >>>>>>> =ERROR REPORT==== 19-Mar-2015::18:04:36 === >>>>>>> Error in process <0.160.0> with exit value: {[{reason,{badarg,"Can't resolve the priv_dir of application websocket"}},{mfa,{cowboy_static,init,2}},{stacktrace,[{cowboy_static,priv_path,2,[{file,"src/cowboy_static.erl"},{line,66}]},{cowboy_static,init_opts,2,[{file? >>>>>>> >>>>>>> Thank you. >>>>>>> >>>>>>> Samir >>>>>>> _______________________________________________ >>>>>>> Extend mailing list >>>>>>> Extend at lists.ninenines.eu >>>>>>> https://lists.ninenines.eu/listinfo/extend >>>>>>> >>>>>> >>>>>> -- >>>>>> Lo?c Hoguin >>>>>> http://ninenines.eu >>>>> >>>> >>>> -- >>>> Lo?c Hoguin >>>> http://ninenines.eu >>> >> >> -- >> Lo?c Hoguin >> http://ninenines.eu > -- Lo?c Hoguin http://ninenines.eu From samset at wanadoo.fr Thu Mar 19 19:32:11 2015 From: samset at wanadoo.fr (Samir Sow) Date: Thu, 19 Mar 2015 19:32:11 +0100 Subject: [99s-extend] cowboy websocket example runtime error In-Reply-To: <550B0F86.7080509@ninenines.eu> References: <550B0305.5080108@ninenines.eu> <2BC2405E-905C-4BE7-A579-61FC2AE3E737@wanadoo.fr> <550B09F0.9000907@ninenines.eu> <550B0DB9.9030906@ninenines.eu> <550B0F86.7080509@ninenines.eu> Message-ID: <21D40E7B-2E5E-4EF8-AC2A-2D5229A091AF@wanadoo.fr> OK. The error is cleared. Now i get a 404 on the client when trying to connect. Thank you. Samir > On 19 mars 2015, at 19:03, Lo?c Hoguin wrote: > > No. ERL_LIBS=_rel/hello_world_example/lib > > Or, ERL_LIBS=..:deps if you want the non-release version. Beware of what's in .. though (should be fine if you are in the examples folder). > > On 03/19/2015 07:01 PM, Samir Sow wrote: >> You mean where src, priv, ebin, deps ? are, right ? >> >> Samir >> >>> On 19 mars 2015, at 18:56, Lo?c Hoguin wrote: >>> >>> ERL_LIBS should point to the lib directory (where the application directories are), not to the root directory of the release. >>> >>> On 03/19/2015 06:46 PM, Samir Sow wrote: >>>> I?ve exported ERL_LIBS= before erl execution. but got same error ... >>>> >>>> >>>>> On 19 mars 2015, at 18:40, Lo?c Hoguin wrote: >>>>> >>>>> If you don't use the release start script it can still work but you must define ERL_LIBS to let Erlang know where applications are located (-pa **ebin only says where *beams* are located). >>>>> >>>>> Maybe more things. >>>>> >>>>> On 03/19/2015 06:31 PM, Samir Sow wrote: >>>>>> Manually from the application root dir. >>>>>> with exec erl >>>>>> Then starting all required applications >>>>>> >>>>>> Not very clever i admit but could not print debug info with _rel/bin/websocket >>>>>> >>>>>> Samir >>>>>> >>>>>> >>>>>>> On 19 mars 2015, at 18:10, Lo?c Hoguin wrote: >>>>>>> >>>>>>> How do you run it? >>>>>>> >>>>>>> On 03/19/2015 06:08 PM, Samir Sow wrote: >>>>>>>> Hi there, >>>>>>>> >>>>>>>> I would appreciate your help to understand the following error when running the websocket example. >>>>>>>> >>>>>>>> Context is : >>>>>>>> >>>>>>>> ERL 17 >>>>>>>> Cowboy 2.0.0-pre (master) >>>>>>>> no source modification >>>>>>>> >>>>>>>> >>>>>>>> =ERROR REPORT==== 19-Mar-2015::18:04:36 === >>>>>>>> Error in process <0.160.0> with exit value: {[{reason,{badarg,"Can't resolve the priv_dir of application websocket"}},{mfa,{cowboy_static,init,2}},{stacktrace,[{cowboy_static,priv_path,2,[{file,"src/cowboy_static.erl"},{line,66}]},{cowboy_static,init_opts,2,[{file? >>>>>>>> >>>>>>>> Thank you. >>>>>>>> >>>>>>>> Samir >>>>>>>> _______________________________________________ >>>>>>>> Extend mailing list >>>>>>>> Extend at lists.ninenines.eu >>>>>>>> https://lists.ninenines.eu/listinfo/extend >>>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Lo?c Hoguin >>>>>>> http://ninenines.eu >>>>>> >>>>> >>>>> -- >>>>> Lo?c Hoguin >>>>> http://ninenines.eu >>>> >>> >>> -- >>> Lo?c Hoguin >>> http://ninenines.eu >> > > -- > Lo?c Hoguin > http://ninenines.eu From samset at wanadoo.fr Mon Mar 30 17:12:12 2015 From: samset at wanadoo.fr (Samir Sow) Date: Mon, 30 Mar 2015 17:12:12 +0200 Subject: [99s-extend] websocket handler Message-ID: <13CCCB29-ECBD-4CC8-BD53-36A73DD7A62D@wanadoo.fr> Hi, I would like to pass data to my websocket handler (Opts params). init({tcp, http}, Req, Opts) -> {upgrade, protocol, cowboy_websocket, Req, Opts}. websocket_init(_TransportName, Req, Opts) -> I guess the Opts param is read from the routing data. What?s the right syntax to do that. Dispatch = cowboy_router:compile([ {'_', [ {'_', , []} ]} ]), Thank you. Sincerely. Samir Sow From essen at ninenines.eu Mon Mar 30 17:18:02 2015 From: essen at ninenines.eu (=?UTF-8?B?TG/Dr2MgSG9ndWlu?=) Date: Mon, 30 Mar 2015 17:18:02 +0200 Subject: [99s-extend] websocket handler In-Reply-To: <13CCCB29-ECBD-4CC8-BD53-36A73DD7A62D@wanadoo.fr> References: <13CCCB29-ECBD-4CC8-BD53-36A73DD7A62D@wanadoo.fr> Message-ID: <5519692A.4070200@ninenines.eu> [] is "Opts" in init/3. Whatever value you put there you receive in your handler. On 03/30/2015 05:12 PM, Samir Sow wrote: > Hi, > > I would like to pass data to my websocket handler (Opts params). > > init({tcp, http}, Req, Opts) -> > {upgrade, protocol, cowboy_websocket, Req, Opts}. > > websocket_init(_TransportName, Req, Opts) -> > > I guess the Opts param is read from the routing data. > What?s the right syntax to do that. > > Dispatch = cowboy_router:compile([ > {'_', [ > {'_', , []} > ]} > ]), > > Thank you. > > Sincerely. > > Samir Sow > _______________________________________________ > Extend mailing list > Extend at lists.ninenines.eu > https://lists.ninenines.eu/listinfo/extend > -- Lo?c Hoguin http://ninenines.eu From samset at wanadoo.fr Mon Mar 30 17:24:09 2015 From: samset at wanadoo.fr (Samir Sow) Date: Mon, 30 Mar 2015 17:24:09 +0200 Subject: [99s-extend] websocket handler In-Reply-To: <5519692A.4070200@ninenines.eu> References: <13CCCB29-ECBD-4CC8-BD53-36A73DD7A62D@wanadoo.fr> <5519692A.4070200@ninenines.eu> Message-ID: Thanks Lo?c. Samir > On 30 mars 2015, at 17:18, Lo?c Hoguin wrote: > > [] is "Opts" in init/3. Whatever value you put there you receive in your handler. > > On 03/30/2015 05:12 PM, Samir Sow wrote: >> Hi, >> >> I would like to pass data to my websocket handler (Opts params). >> >> init({tcp, http}, Req, Opts) -> >> {upgrade, protocol, cowboy_websocket, Req, Opts}. >> >> websocket_init(_TransportName, Req, Opts) -> >> >> I guess the Opts param is read from the routing data. >> What?s the right syntax to do that. >> >> Dispatch = cowboy_router:compile([ >> {'_', [ >> {'_', , []} >> ]} >> ]), >> >> Thank you. >> >> Sincerely. >> >> Samir Sow >> _______________________________________________ >> Extend mailing list >> Extend at lists.ninenines.eu >> https://lists.ninenines.eu/listinfo/extend >> > > -- > Lo?c Hoguin > http://ninenines.eu