R
Ryan Parmeter
I am writing a small TimeP (RFC 868) server to sync time with some
networking equipment. The equipment that shall go nameless requires the
use of UDP.
As far as I can tell, my only option to write to a UDPSocket is to use
the send method, which takes a string. I need to send a 32bit integer
representing the date in a UDP packet and I'd love to use something
like:
myUDPsocket.send( Time.now.to_i, 0, host, port)
In my situation I can't change the receiving program to accept a string
or I could do it that way. I can't convert the integer to a string
either because that would blow my 32 bit requirement. Does anyone have
any idea?
~Parkingmeter
networking equipment. The equipment that shall go nameless requires the
use of UDP.
As far as I can tell, my only option to write to a UDPSocket is to use
the send method, which takes a string. I need to send a 32bit integer
representing the date in a UDP packet and I'd love to use something
like:
myUDPsocket.send( Time.now.to_i, 0, host, port)
In my situation I can't change the receiving program to accept a string
or I could do it that way. I can't convert the integer to a string
either because that would blow my 32 bit requirement. Does anyone have
any idea?
~Parkingmeter