Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Hnoss

Pages: [1]
1
System / Re: Thread gives no copy even when given a reference.
« on: May 06, 2013, 12:53:07 pm »
Indeed I made a mistake in the post, I'm sorry.

I actually did write
void send(sf::TcpSocket client)

instead of
void send(sf::TcpSocket &client)
in the prototype.
I did not make that mistake for the receive function though.

Thank you Nexus and asusralis, you helped me to finish my first project using SFML (the basic principle of a chat).

2
System / Re: Thread gives no copy even when given a reference.
« on: May 06, 2013, 01:24:19 am »
Hi, I'm trying to do something similar and I have the same error.

I tried to do
sf::Thread send(std::bind(&send, ref(socket));

according to what I found in http://en.cppreference.com/w/cpp/utility/functional/bind

but it didn't work saying that I'm still copying the socket (the same error).

I have no clue of what to do right now.

Pages: [1]
anything