Nov 18, 2017 19:22
Though you can write an answer and I will definetally accept it
Nov 18, 2017 19:22
I'm really sorry for wasting your time like that
Nov 18, 2017 19:22
Now everything is working perfectly
Nov 18, 2017 19:20
so I never actually tested io client connection with host other than 127.0.0.1:9639
Nov 18, 2017 19:19
then it took just a few moments for me to realize, that I forgot to bundle the code
Nov 18, 2017 19:19
I've changed the host on client side, and then the output was the same
Nov 18, 2017 19:18
console.log(socket.handshake.headers.host) --> 127.0.0.1:9639
Nov 18, 2017 19:14
console.log('host', req.get('host')) --> host localhost:9639
Nov 18, 2017 18:53
note that this code is bundled with webpack
Nov 18, 2017 18:53
or just var socket = global.socket = require('socket.io-client')();
Nov 18, 2017 18:52
or var socket = global.socket = require('socket.io-client')('http://127.0.0.1:9639');
Nov 18, 2017 18:52
var socket = global.socket = require('socket.io-client')('http://localhost:9639');
Nov 18, 2017 18:51
Well this is how I initialise app = express(); server = http.createServer(app); io = require('socket.io')(server);, so I believe - yes. Also on the client side I tried setting the socket host to http://127.0.0.1:9639, http://localhost:9639 and leaving it undefined, but I've got the same result in all situations..
Nov 18, 2017 18:51
Well, after the cookie is set - the client is redirected to a path, where the cookie value is loged (correct) and only then the socket connection is made. After all this, I can kill the server and launch it again. The cookie value (without reseting) will remain correct on express and incomplete in socket.io. So I'm sure about that one as well
Nov 18, 2017 18:51
I am totally sure that the socket connection is made after the cookies are set
 

Lounge<C++>

Today we're daydreaming about C++26 reflection
Feb 11, 2014 18:19
@Fanael and by that you ment?
Feb 11, 2014 18:15
Vim and gnu make
Feb 11, 2014 18:12
Feb 11, 2014 18:09
@ScottW no?
Feb 11, 2014 18:08
i still love you :)
Feb 11, 2014 18:08
anyway
Feb 11, 2014 18:08
@ScottW you eat your chips and say "Nom, nom, nom"
Feb 11, 2014 18:07
and you're probably fat
Feb 11, 2014 18:06
pff
Feb 11, 2014 18:05
@ScottW what?
Feb 11, 2014 18:03
@MartinJames yeah, now when you said it, it looks pretty obvious to me also.
Feb 11, 2014 18:01
"You need to state the problem you have, not the solution you want"
Feb 11, 2014 18:01
no
Feb 11, 2014 18:00
that was not that hard
Feb 11, 2014 18:00
thanks :)
Feb 11, 2014 18:00
okay
Feb 11, 2014 17:59
this is a fast one
Feb 11, 2014 17:59
:D
Feb 11, 2014 17:59
cmon
Feb 11, 2014 17:58
virtual doesn't work in this case
Feb 11, 2014 17:58
how do ya override a non-static variable of a super class with a static variable?
Feb 11, 2014 12:44
I want to make a scheme of objects, children and grandchildren
Feb 11, 2014 12:42
I need it for object orientated programing
Feb 11, 2014 12:42
anyone know any good software for making schemes?
Feb 11, 2014 12:41
hi
Feb 6, 2014 05:39
AFAIK
Feb 6, 2014 05:39
the functions would receive a copy
Feb 6, 2014 05:39
if i would pass a reference
Feb 6, 2014 05:38
yeah, but i want to change that element in a function
Feb 6, 2014 05:37
thanks :)
Feb 6, 2014 05:37
passing a pointer to an element in a vector is fine
Feb 6, 2014 05:36
as far as I understand what the reference says
Feb 6, 2014 05:36
he
Feb 6, 2014 05:34
oh yea
Feb 6, 2014 05:34
should that not work for some reason?