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 - gus

Pages: [1]
1
Network / Re: Send big packet - raspberrypi tcp socket
« on: September 28, 2015, 09:47:05 am »
Wouuuups big mistake: while added a socket.setBlocking(false) in a strange place (some left over from old code) and didn't noticed it..

Anyway, thanks!  ;D

2
Network / Re: Send big packet - raspberrypi tcp socket
« on: September 27, 2015, 11:01:04 pm »
Ok I've found the problem: by default tcp sockets are in non blocking mode on the raspberry pi... I think this behavior should be changed or at least documented (I got the impression from the tutorials that it was on blocking by default at least) as it's different for different platforms.

3
Network / Re: Send big packet - raspberrypi tcp socket
« on: September 27, 2015, 01:10:53 pm »
mkay seems like I bricked my pi by installing wireshark. I have to wipe out everything/reinstall evezrything, might take some time :(

4
Network / Re: Send big packet - raspberrypi tcp socket
« on: September 27, 2015, 11:44:15 am »
well the image is 360*480*sizeof(Uint32).
it works with (360/20)*(480/20)(Uint32) might work with something bigger though, I don't know the exact limit ;)

I don't know what Wireshark is, i'll look into it ;)



5
Network / Re: SFML Server doesn't accept more than one client
« on: September 27, 2015, 11:30:25 am »
I think the tcp listener needs to be set to non blocking too right?

6
Network / Send big packet - raspberrypi tcp socket
« on: September 27, 2015, 11:25:20 am »
Hi,

first, thanks for this awsome library  ;D

I have a problem while sending packet using SFML network tcp socket on raspberry pi. I'm basically sending a rather big packet (an uncompressed image), and while the programm works fine on windows (the image in recieved and sent perfectly), it doesn't work on the raspberry pi (the raspberry pi only send the image, it is received on another computer).
Or to be more precise, it doesn't work if the image is too big (ie the packet is too big). With a small image, things works. Besides, sending one "too big" packet seems to mess up every following packets, too big or not.

Here is the sending code
        packet << sf::Uint32(img.size().width);
        packet << sf::Uint32(img.size().height);
        for (int x = 0; x < img.size().width; x++)
        {
                for (int y = 0; y < img.size().height; y++)
                {
                        cv::Vec3b c = img.at<cv::Vec3b>(y, x);
                        packet << sf::Uint32((int)c.val[0]);
                        packet << sf::Uint32((int)c.val[1]);
                        packet << sf::Uint32((int)c.val[2]);
                }
        }

Any idea what might be happening? Oh and the sending socket is blocking and the reciever socket is non blocking.

Thanks!

Pages: [1]