I’m trying to create a socket connection and read the buffer as an array of bytes. The socket connection works fine. So performering a simple socket.recv (returns a string) works fine, however, when I perform a socket.recv_into (reads buffer as array of bytes) it doesn’t work. The error seems to indicate that socket.recv_into isn’t included in the library. Any advice would be appreciated.
IP = ‘localhost’
Port = 4103
buff = 100
s = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
#nbytes = s.recv_into(data) [color=#0000FF]#This doesnt work[/color]
data = s.recv(buff) [color=#0000FF] #This WORKS![/color]