Sign in to follow this  

Disconnecting a client

This topic is 4488 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi. I want to make sure my Network class is secured before I leave it, so I implemented a TEA encryption to it and the messages are always ordered in the same way (the server should disconnect a client that sent a message with a wrong order, which also could be a wrong password). But what happens when I have 1 server with 3 clients, where 1 of them is a cheater who tries to hack my game. Right now the server wouldn't send it an encrypted random number and ask for an encrypted serial string. But if it will and the string is false? how can i disconnect that client? or if while the server doesnt get the serial the server will send to everyone something encrypted? the cheater will get it too, doesnt he? I also hope that its not my network design problem..it simply accept any connection after listen, and has only 1 private socket handler. and it always not uses Nagle's algorithm and use non-blocking sockets. Thanks, pex.

Share this post


Link to post
Share on other sites
You can always disconnect a client with closesocket(int).

If you send a message to each person connected, you can always check before sending unverified people encrypted data. Just store whether each user has been verified before sending them important data. If they haven't, then skip them.

I don't know exactly how you programmed it, but it should be easy to filter out who you send data to.

Share this post


Link to post
Share on other sites
Oh wait, I need more than 1 SOCKET, right?
after i do:
SOCKET a,b;
a=listen();
b=accept();
i dont do a=b later? i see. MSDN did that, and it seems to be different than in Johnnie's tutorial.
Thanks!

Share this post


Link to post
Share on other sites

This topic is 4488 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this