sketchucation logo sketchucation
    • Login
    1. Home
    2. sungamer
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    🛣️ Road Profile Builder | Generate roads, curbs and pavements easily Download
    S
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 1
    • Groups 1

    sungamer

    @sungamer

    0
    Reputation
    1
    Profile views
    1
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    sungamer Unfollow Follow
    registered-users

    Latest posts made by sungamer

    • UDP Socket and Threading in API

      Hey,

      I'm trying to integrate a new self developed input device into SU. The device is connected over RS232 and data is processed through an C# application.
      Now I tried to send the data over UDP to SU. This is my Ruby Plugin code for testing:

      require 'socket'
      
      server = Thread.new {
      	$port = 3157
      	$maxSize = 100
      	serverSocket = UDPSocket.new
      	serverSocket.bind("127.0.0.1", $port)
      
      	UI.messagebox("Socket open!")
      
      	loop {
      		data = serverSocket.recvfrom($maxSize)
      		if data.length != 0
      			UI.messagebox(data)
      		end
      	}
      
      }
      

      If I send a UDP message to this socket, i don't get a message from SU but Windows shows me, that the socket is open.
      Could anybody tell me why this is not working? Thank you!

      Greetings,
      Patrick

      posted in Developers' Forum
      S
      sungamer