x


Disconnecting a specified client?

Hi. Let's say I'm server, I'm waiting a verify information from connected players when they are connecting. But it is not my client, probably a spam or hacker. How can I disconnect it from server?

I make a picture for it

alt text

more ▼

asked Feb 08 '12 at 10:17 PM

bisaniyehocam gravatar image

bisaniyehocam
148 35 39 47

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

Network.CloseConnection(); is what you are looking for.

Presuming you're using Unity's native networking, that is. If you're running your own server that's something else entirely, but for Unity the server knows all the IP addresses of all clients and can terminate connection to a specific IP address.

Sadly it's not possible to disallow a client to connect to the server, you can only close a connection after it's been made.

more ▼

answered Feb 08 '12 at 10:43 PM

asafsitner gravatar image

asafsitner
2.4k 3 8 19

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x831
x733
x5
x1

asked: Feb 08 '12 at 10:17 PM

Seen: 614 times

Last Updated: Feb 08 '12 at 10:45 PM