6 # @brief <p> Plugin for GMyth-Stream
8 # Copyright (C) 2007 INdT - Instituto Nokia de Tecnologia.
9 # @author Artur Duque de Souza <artur.souza@indt.org.br>
12 # This program is free software; you can redistribute it and/or modify
13 # it under the terms of the GNU Lesser General Public License as published by
14 # the Free Software Foundation; either version 2 of the License, or
15 # (at your option) any later version.
17 # This program is distributed in the hope that it will be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 # GNU General Public License for more details.
22 # You should have received a copy of the GNU Lesser General Public License
23 # along with this program; if not, write to the Free Software
24 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
33 def __init__(self, config):
35 self.port = int(config.get("Comm", "port"))
38 self.tcp = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
39 self.tcp.bind( (self.host, self.port) )
43 return time.strftime("%Y-%m-%d %H:%M:%S");
45 def getMsg(self, size):
50 self.data = self.tcp.accept()
51 print "[%s] Received request from ip=%s" % (self.now(), self.data[1] )
54 def disconnect_client(self, connection):