code: def connectToServer(self):
      
      self.rtspSocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
      try:
        self.rtspSocket.connect((self.serverAddr, self.serverPort))
      except:
        tkinter.messagebox.showwarning('Connection Failed', 'Connection to \'%s\' failed.' %self.serverAddr)
docs: Connect to the Server. Start a new RTSP/TCP session.