#!/usr/bin/python
# coding: ascii
import socket
import codecs
hote = "localhost"
port = 1011
clientA = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
clientA.connect((hote, port))
msg_a_envoyer = b""
while True:
messageA = "isOnline"
clientA.send(messageA.encode())
messageB = clientA.recv(1024)
messageB.decode()
if messageB == "serverStatus:yes":
connectbutton = 1
clientA.close()
But Construct don't know what encode() is :
---------------------------
Erreur
---------------------------
Traceback (most recent call last):
File "<string>", line 27, in <module>
LookupError: no codec search functions registered: can't find encoding
---------------------------
OK
---------------------------
What do you think is the best to do, continue using socket library or use PodSixNet ?
Regards, playerelite