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

Pages: 1 [2]
16
Network / Problem with receiving sf::Packet
« on: September 01, 2009, 09:12:58 pm »
Yes, because it's the server freeze, not the unoffical client problem. In this case, the other (normal) players can't play anymore. Server is dead, until the unoffical client disconnected.

17
Network / Problem with receiving sf::Packet
« on: September 01, 2009, 07:56:57 pm »
I'm writing the client also. But I don't have any guarantee if anyone doesn't use his own client (for example telnet.exe).
It looks like creating the web application without any protection :) Who rational will enter ' or 1=1 -- instead of his login?

18
Network / Problem with receiving sf::Packet
« on: September 01, 2009, 06:48:23 pm »
Yes, of course, but it's totally useless when every player can stop server by sending 'incomplete' packet. Is there any way to verify data before receiving as packet?

19
Network / Problem with receiving sf::Packet
« on: September 01, 2009, 05:35:07 pm »
Hello, I found a problem with the sf::SocketTCP::Receive(sf::Packet) function. When I send data, that is not sf::Packet, and try to recieve it with above mentioned function, the code freeze until the client disconnected.

My English is poor, so I'm not sure if anyone will understand my post. :oops: So, I'll try to explain how to reproduce the problem with simple steps:

1. Download and compile example from selectors tutorial:
http://www.sfml-dev.org/tutorials/1.5/network-selector.php

2. Start the program as server

3. (In windows) run "telnet.exe 127.0.0.1 2435"

4. Press any key

The server is no longer responding, until I close the telnet window.

It's a really easy way to "hack" the server. Using a Receive (char *Data, std::size_t MaxSize, std::size_t &SizeReceived) function works, but I'm getting only raw data, not a sf::Packet.

20
Network / sf::Packet and single char
« on: September 01, 2009, 12:06:21 pm »
Oops, that's because I used sf::Uint8 instead of sf::Int8. So, unsigned char works, signed doesn't :)

21
Network / sf::Packet and single char
« on: September 01, 2009, 11:29:59 am »
It works correctly, so my problem is solved, thanks. :)
Anyway, it's nice to know, why the char type didn't work...

22
Network / sf::Packet and single char
« on: August 31, 2009, 09:42:08 pm »
Sending other types of data works, but sending char with (for example) string, doesn't work...

23
Network / sf::Packet and single char
« on: August 31, 2009, 08:00:07 pm »
Hi

Is it possible, to send and receive single char via sf::packet? I'm trying to do this with simple code:

Code: [Select]

sf::Packet packet;
char test = 0x01;
packet << test;
//sending packet



Code: [Select]

sf::Packet packet;
//receiving packet
char test;
packet >> test;
if (test == 0x01) std::cout << "Correct";
else std::cout << "Wrong" << (int)test;


...but it's not work: test is alyways 0.

Is there any solution for this problem?
Thanks

Pages: 1 [2]