Quantcast
Viewing all articles
Browse latest Browse all 5791

Grasshoper freeze when use while function

Hello, i tried to use UDP listener with Ghpython but always Grasshopper freezes.
that happened always when i use while function, what is the problem ?

import socket

UDP_ip = "192.168.1.0"
UDP_port = 50025

serverSock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)

serverSock.bind(((UDP_ip,UDP_port)))

while True:
    data, addr = serverSock.recvfrom(1024)
    print "Message: ", data

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 5791

Trending Articles