How Do I Close A Clientsocket ? - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26) +--- Thread: How Do I Close A Clientsocket ? (/showthread.php?tid=18718) |
- jimity - 2006-03-11 hey guys, i've been looking in other scripts to hopefully get a few pointers on this but not getting anywhere fast i was wondering if anyone knows how to close a socket (networking) connection through a scipt ? so far i've managed to find that the command to connect to another host is the following: clientsocket.connect((hostname, port)) i havent been able to find anything though that tells me how to close it. would it be something like : clientsocket.close? clientsocket.disconnect? so far i've tried these two but it doesn't appear to do anything. i assume this is the wrong syntax. any help would be really appreciated. . .thanx in advance. . . - thor918 - 2006-03-12 it should be close http://www.koders.com/python....60.aspx or you could send a command to the server, so that the server closes the connection(this would require that the server inteprets a close command.). like the xbmcdebugger script does. http://www.xboxmediaplayer.de/cgi-bin....ebugger Quote:#!/usr/bin/python - jimity - 2006-03-12 thanks thor. that linked code has taught me a lot about python and what i'm currently trying. :d i've just started to learn the python language and it definately isn't my strong suit yet prepare for more stupid questions to the forum as time goes on |