-
Disconnect
Hi, I'm asked to make a program for a lan-party (http://www.vbforums.com/showthread.php?t=443896)
So I came up with an idea.
The main server closes all IP's that are NOT on some kind of list every x seconds.
So without the IP change thing.
So lets say I request the source code (or how to) to disconnect from a specific IP..
Is this possible in one of the languages I know? (VB,C#,C,C++)
-
Re: Disconnect
do you want to disconnect a client if its IP address is not in the list?
-
Re: Disconnect
-
Re: Disconnect
well in chat programs and so on you basically make a class for the client.. then when client connects you set the right values in the calss like winsock indexm IP address, NICK and everything else that is needed, and put the class in collection.. then you can simply loop via the collection, and check each clients ip address, if it matches then disconnect the client..
-
Re: Disconnect
yea I thought of that...
I did already make the design and stuff...
But how can I make a disconnect function..
Since its not only disconnect from the chat program..
Ok, let me explain what I want exactly..
You have this setup:
[Client] -------- [Switch]---------[Server]
...........................|
...........................|
.......................[Client]
The Clients what to play UT07 for example
The Left Client sends a Signal to the Switch.
And the Switch sends it to the other Client..
In the meantime the Server is running some kind of sniffer on each port.
And the server will get such information:
<Sending PC><Target PC><Port><Packet>
so It will look like:
192.168.2.1 192.168.2.2 6642 F2F8
Very easy example..
Now I want that the server checks.
The Senders IP and the Getting IP that they stand in a list..
If they are not in the list I want to server to interact with the Connection.
Lets say the right one didn't pay and the one on the down side does.
I want you'll get something like this:
[Client] ---X---- [Switch]---------[Server]
...........................|
...........................|
.......................[Client]
The x means Disconnected..
I guess the Idea is VERY clear now :P
This isn't going to be a Easy Program. ^^
hope I can get some help..
I don't need help with the sniffing and stuff.
I only need ot know how to disconnect it from the Switch/Hub/Router..
Is there a way to do such a thing.
Or is is nessercary that all connections go through the Server?
(This isn't only programming, this needs Network knowledge..)
-
Re: Disconnect
i dont really understand (maybe im stup1d :p ) - why to disconnect them from switcher? instead just block its access to the chat program, wouldnt that be easyer and almost the same result - not allow the specific ip to access the chat?
-
Re: Disconnect
The reason is very easy..
When they are disconnected from the switch they can't play a game with Player 2
When they are only blocked from a chat program. They aren't able to speak with each other.
They they download Skype, Yahoo, MSN, IRC or an other chat client to do so..
-
Re: Disconnect
You're talking about Computer A disconnecting Client B from "Switch" C? Only if the software in C is written to accept a "disconnect" comnmand from A. You can't run software that will disconnect someone from some server over which you have no control.
-
Re: Disconnect
I made up a good way.
We're going to use Linksys Switches.
You can run your own software on them ^^
-
Re: Disconnect
What is the point? How if later you want to connect the disconnected client back to the switch? then you 'll unable to do that.
-
Re: Disconnect
Nah, I did solve the problem by making the Router Check every 5 Minutes for all clients in the list.
When a unknown MAC is connected he will disconnect the link.
You can add your MAC to the list to visit the RouterPage and there you enter your ID you got at the Entrance.
The only thing is.. MAC address Spoofing is easy.. -.-' but ah thats his prob. :P