Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 How to combine data taken from server between client and GUI?
Quote:show what you've tried

I attached a photo to previous reply. Don't view it ? I'm adding code now.

import socket
class client:
    def __init__(self):
        self.HOST = ''  # The server's hostname or IP address, NodeMCU IP Address
        self.PORT = 80              # The port used by the server, PORT NUMBER in ARDUINO CODE
    def transfer_data(self):
        s.connect((HOST, PORT))
        s.sendall(b'Hello, world') = s.recv(1024)
# To try run stand-alone
if __name__ == '__main__':
    cl = client()
> & "C:/Program Files/Python37/python.exe" c:/Users/User/Desktop/PYQT/ Traceback (most recent call last): File "c:/Users/User/Desktop/PYQT/", line 16, in <module> cl.transfer_data() File "c:/Users/User/Desktop/PYQT/", line 9, in transfer_data s.connect((HOST, PORT)) NameError: name 's' is not defined

Top Page

Messages In This Thread
RE: How to combine data taken from server between client and GUI? - by bescf - Apr-01-2019, 03:12 PM

Possibly Related Threads...
Thread Author Replies Views Last Post
  simple udp server/client cardmaker 2 156 Nov-26-2019, 12:36 AM
Last Post: micseydel
  Slow websockets server -> client pattagghiu 0 197 Sep-17-2019, 09:28 AM
Last Post: pattagghiu
  Chat (Client-Server) andresdrr 3 373 Aug-26-2019, 02:01 PM
Last Post: ThomasL
  Python server(Django web site)/client(Python app) connection Junior_Pythoneer 5 408 Jul-05-2019, 05:41 PM
Last Post: noisefloor
  tcp server/client port connection issue valshev 2 2,168 Sep-01-2018, 02:50 PM
Last Post: valshev
  Send data BMP180 between client and server trought module socket smalhao 0 777 Jul-30-2018, 12:56 PM
Last Post: smalhao
  Sending/Receiving Multiple Message from Server or Client Lyperion 0 1,461 Jul-30-2018, 07:52 AM
Last Post: Lyperion
  Need help to make a server/client for DNS Eddie05 1 949 Jun-12-2018, 10:04 AM
Last Post: j.crater
  Simple send and recive string Server/Client Epilepsy 1 1,097 May-01-2018, 08:17 PM
Last Post: ThiefOfTime
  python socketio-client-2 and nod js socketio server communication is not success vmyadhu2 2 3,558 Oct-02-2017, 04:22 AM
Last Post: vmyadhu2

Forum Jump:

Users browsing this thread: 1 Guest(s)