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

Pages: [1]
1
Network / Re: Receiver stops working after a while
« on: December 20, 2013, 04:44:20 am »
Just some closure if anyone finds this topic:

I found that the problem was that the labview client was sending data too fast and overflowing the buffer, which essentially lent to the server crashing. I updated my program so that it fetches data at 5 times the previous rate, and this makes it so that both can communicate better.

2
Network / Re: Receiver stops working after a while
« on: December 19, 2013, 04:22:57 am »
It's not that I don't want to share my code, is that my code is pretty much it. It receives the data and processes it, before fetching the next packet. The issue might be caused on the server side. I am investigating this issue right now in the labview code.

Thanks anyway for the help

3
Network / [SOLVED]Receiver stops working after a while
« on: December 18, 2013, 02:10:02 am »
I am using SFML for my application and I use a socket to listen to the data being outputted by another application in the same machine. However, after a few cycles, the socket stops working. In blocking mode it completely freezes my application, while in non-blocking mode it fails to get the data and keeps using the last one before freezing. A snippet of the code used is below

sf::IpAddress Address = sf::IpAddress::LocalHost;
sf::TcpSocket socket;
socket.disconnect();
sf::TcpListener listener;
socket.connect(Address, port);
//socket.setBlocking(false);

void update()
{
        std::size_t received;
        if (socket.receive(buffer, sizeof(buffer), received)!= sf::Socket::Done)
                printf("could not get data");
}
 

Any clues as to what might cause this issue? The data is generated trough a labview application and send 336 bytes burst at a time (I tried using the buffer smaller, bigger and exactly, with issues in all of them).


FSML 2.1, windows 7 32 bits, Visual Studio 10 express

Pages: [1]