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?
#4
Quote:as a class:
Client.py
import socket

class Client:
    def __init__(self):
        self.HOST = '192.168.1.59'  # 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')
        self.data = s.recv(1024)

    
# To try run stand-alone
if __name__ == '__main__':
    cl = Client()
    cl.transfer_data()
    print(cl.data)

İmage


I tried. What should i do ?
Quote

Top Page

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

Possibly Related Threads...
Thread Author Replies Views Last Post
  simple udp server/client cardmaker 2 148 Nov-26-2019, 12:36 AM
Last Post: micseydel
  Slow websockets server -> client pattagghiu 0 191 Sep-17-2019, 09:28 AM
Last Post: pattagghiu
  Chat (Client-Server) andresdrr 3 355 Aug-26-2019, 02:01 PM
Last Post: ThomasL
  Python server(Django web site)/client(Python app) connection Junior_Pythoneer 5 406 Jul-05-2019, 05:41 PM
Last Post: noisefloor
  tcp server/client port connection issue valshev 2 2,155 Sep-01-2018, 02:50 PM
Last Post: valshev
  Send data BMP180 between client and server trought module socket smalhao 0 770 Jul-30-2018, 12:56 PM
Last Post: smalhao
  Sending/Receiving Multiple Message from Server or Client Lyperion 0 1,412 Jul-30-2018, 07:52 AM
Last Post: Lyperion
  Need help to make a server/client for DNS Eddie05 1 946 Jun-12-2018, 10:04 AM
Last Post: j.crater
  Simple send and recive string Server/Client Epilepsy 1 1,090 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,553 Oct-02-2017, 04:22 AM
Last Post: vmyadhu2

Forum Jump:


Users browsing this thread: 1 Guest(s)