beautypg.com

BrightSign Object Reference Manual (FW 5.1) User Manual

Page 195

background image

187

print "Datagram: "; event

endif

end while

roDatagramSocket

This object both sends and receives UDP packets. Use roDatagramSocket if you need the player to communicate using
protocols such as SSDP, which only allow a server to respond to the source of a received request.

Received packets are delivered to the message port as roDatagramEvent objects.

Interfaces:

ifUserData

,

ifMessagePort,

ifDatagramSocket

,

ifIdentity


The ifUserData interface provides the following:

SetUserData(user_data As Object): Sets the user data that will be returned when events are raised.

GetUserData() As Object: Returns the user data that has previously been set via SetUserData(). It will
return Invalid if no data has been set.


The ifMessagePort interface provides the following:

SetPort(a As Object)


The ifDatagramSocket interface provides the following:

GetFailureReason() As String: Returns additional information if the BindToLocalPort or Sendto
methods fail.

BindToLocalPort(port As Integer) As Boolean: Binds the socket to the specified local port. Use this
method to receive packets sent to a specific port. Alternatively, if you want to receive replies to sent packets (and it