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

Pages: [1]
1
SFML projects / Re: My proyect: ImageRunner
« on: August 03, 2013, 09:22:33 pm »
i was messing with this for atleast an hour. good job

2
SFML projects / Re: [New project] Uoke's Recovery!
« on: August 03, 2013, 09:04:03 pm »
a few compatibility issues, look into your graphics. :)

3
General / Re: SFML Compile Error (C++ and Code::Blocks)
« on: August 03, 2013, 09:01:31 pm »
Check your linking

4
Network / Re: Multiple clients
« on: August 03, 2013, 08:38:57 pm »
I suppose this would also be known as socket selectors?

5
Network / Multiple clients
« on: August 03, 2013, 08:32:31 pm »
I have found a tutorial on how to do multiple clients with SFML, but even i can see that the developer was lost in their own code. :)

I have crossed SFML documentation stating how to connect to multiple clients, but i strongly believe that it was for a earlier version of SFML. So how can we implement several clients to a server?

6
We need to know the data you have recorded inorder to know the data we need to find.

7
Network / Re: connecting externally
« on: August 03, 2013, 07:30:58 pm »
You can connect to yourself using your public IP, but you have to configure your router and firewall so that they don't block the connection.

;) lets drop that suggestion from future suggestions. it's quite obvious :)

8
Network / Re: connecting externally
« on: August 03, 2013, 03:47:13 pm »
I was wondering about that. Are you 100% sure about that?
I suppose that my next question would be considered off topic so ill make a new thread :) thank you

9
Network / connecting externally
« on: August 03, 2013, 01:13:47 am »
I have been at this for hours now -.- So annoyed..

I have my server set to listen on port 2000 like sooo..
sf::TcpListener listener;
listener.listen(2000);
listener.accept(socket);
 

Then i have my client set to connect to the server like so...
socket.connect("142.197.200.18", 2000);
 

Why doesn't this work? I need to do this so that people not on my network could connect.. Doing this locally is unacceptable.

Quote
Entire Code:
#include<SFML/Graphics.hpp>
#include<SFML/Network.hpp>
#include<iostream>
#include<stdlib.h>
#include<ctime>
 
int main()
{
    sf::IpAddress ip = "142.197.200.18";
        std::cout << ip;
    sf::TcpSocket socket;
    char connectionType;
    std::string text = "";
    char buffer[2000], mode = 'r';
    std::size_t received;
 
    std::cout << "Enter (s) for Server, Enter (c) for Client: ";
    std::cin >> connectionType;
 
    if(connectionType == 's')
    {
        sf::TcpListener listener;
        listener.listen(2000);
        listener.accept(socket);
        text += "Server";
        mode = 's';
    }
    else if(connectionType == 'c')
    {
        socket.connect(ip, 2000);
        text += "Client";
    }
 
    socket.send(text.c_str(), text.length() + 1);
    socket.receive(buffer, sizeof(buffer), received);
 
    std::cout << buffer << std::endl;
     
    bool done = false;
 
    while(!done)
    {
        if(mode == 's')
        {
            std::getline(std::cin, text);
            socket.send(text.c_str(), text.length() + 1);
            mode = 'r';
        }
        else if(mode == 'r')
        {
            socket.receive(buffer, sizeof(buffer), received);
            if(received > 0)
            {
                std::cout << "Received: " << buffer << std::endl;
                mode = 's';
            }
        }
    }
    return 0;
}
 

10
Network / Re: Sound freezes
« on: June 03, 2013, 11:02:03 pm »
you should think about tidying up that code first.. until then im not even going to bother to look at it.

11
Audio / Re: SFML_LIVE_AUDIO
« on: June 03, 2013, 11:00:47 pm »
Lol, i obviously looked at the documentation. I found no possible solution.
to be more specific, i need a way to put the sf::Record contents inside the sf:sound play function without having to call record.stop().

A sloppy solution i found was by continuously ending and starting the record with the play function in the center but the function was to slow, and cause a {poof} sound from the speakers every time the loop finished.

12
Audio / SFML_LIVE_AUDIO
« on: June 03, 2013, 10:50:52 pm »
I have been trying this for days. I need to capture the live stream of the audio being recorded. Could someone point me in the correct direction for this? Please, hurry as i am VERY obsessive over programming.

Pages: [1]
anything