Open topic with navigation
<viznet:server>.removeClient
Disconnect a client from the server
<viznet:server>.removeClient( |
|
client |
*args |
**kw |
) |
|
client
Name of the client to disconnect
*args
Optional arguments to pass to the client
**kw
Optional keyword arguments to pass to the client
Remarks
This command will disconnect a client from the server. It will send a viznet.SERVER_DISCONNECT_EVENT to the client with the optional data.
Return Value
None
Example
import viznet
viznet.server.start()
def onConnect(e):
if e.sender == 'BAD_CLIENT':
viznet.server.removeClient(e.sender,message='No connection for you!')
viz.callback(viznet.CLIENT_CONNECT_EVENT,onConnect)