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

Pages: [1]
1
Network / Using SFML/Network with another graphical library
« on: May 20, 2013, 06:04:35 pm »
Would it be possible to use the network package of SFML with for example Irrlicht? I've grown attached to the SFML API and I was wondering if I could pursue 3D development by combining a graphical engine (such as Irrlicht) with the networking and audio capabilities of SFML.

So: can I use SFML networking in any application?

2
Network / Re: Why is my server not receiving more than one packet?
« on: May 05, 2013, 09:21:22 pm »
Thanks to your statement I managed to get this example working (by making them non-blocking). I interpreted the 'blocking state' wrongly in the tutorial: I thought it meant something different.

It doesn't work in my game project though, just in a little text based example. But I'll try to make it work :)

3
Network / Re: Why is my server not receiving more than one packet?
« on: May 05, 2013, 06:33:18 pm »
The listener socket on the server is in non-blocking mode, the rest is in blocking mode.
I have allocated the server on the heap and made sure to delete it only after sending the packets, and there was still no output, so that isn't the issue. :/

4
I have another question (didn't want to make another topic for it to avoid flooding the forums ;)). For some reason my server only accepts one packet from each client.
I have this code in the server file:

while(true)
        {
                sf::Packet packet;
                if(client_one->receive(packet) == sf::Socket::Done)
                {
                        std::string s;
                        packet >> s;
                        std::cout << "CLIENT_ONE: " << s << std::endl;
                }
                if(client_two->receive(packet) == sf::Socket::Done)
                {
                        std::string s;
                        packet >> s;
                        std::cout << "CLIENT_TWO: " << s << std::endl;
                }
        }

Which recieves the first packet from each client, but no packets which are sent later. Debugging the application seems to indicate the while(true) ends somehow! What could be the issue?

5
That's embarassing. I didn't scroll down the entire page. Thanks!

6
Network / Why is my server not receiving more than one packet?
« on: May 04, 2013, 03:40:43 pm »
I'm trying out SFML networking for the first time, and I've only got experience with networking in Java. While there are obviously similarities, I'm a bit confused about why this code doesn't work:

<--snip--> I have posted a new question in this thread <--snip-->

7
General / Re: Graphics memory leak
« on: March 21, 2013, 11:28:54 am »
Thank you for the links to the other tools. I will check them out and reply soon with my findings.

EDIT: Turned out it was indeed a false positive. Excuse my false accusations.

8
General / Graphics memory leak
« on: March 21, 2013, 10:51:15 am »
I detected a memory leak in my application using SFML 2 and went to investigate using the _CrtDumpMemoryLeaks() method in Visual Studio 2010. All of my allocated pointers are properly being deleted(I triple checked this), but the tool reported a leak in sfml-graphics.dll (more precisely when rendering a sprite using the method window.draw(image), where image is an instance of sf::Sprite.

Surely, if this really is an issue of SFML, I can not continue to use this library for serious projects.

Pages: [1]
anything