cancel
Showing results for 
Search instead for 
Did you mean: 

example kdb+ udp multicast protobuf

terryyao
New Contributor II

hi guys:

     can someone give an example of socket udp multicast  data formate is protobuf( https://code.kx.com/q/interfaces/protobuf/  )

thanks!

2 ACCEPTED SOLUTIONS

leades
Moderator Moderator
Moderator

Hello,

Thank you for sharing your question with the Community! I will reach out internally and hopefully an example can be given.

Many Thanks

Luke

 

View solution in original post

Hello,

Reverting back with some information: 

There is no native support for UDP sockets in q, so you need to create a socket in C and then bind that to q. Once you have a socket, you can then serialize the data using .protobufkdb.serializeArray, with the data, to get a byte buffer. That byte buffer can then be sent on the UDP socket either as uni or multicast.

Many Thanks

Luke

View solution in original post

2 REPLIES 2

leades
Moderator Moderator
Moderator

Hello,

Thank you for sharing your question with the Community! I will reach out internally and hopefully an example can be given.

Many Thanks

Luke

 

Hello,

Reverting back with some information: 

There is no native support for UDP sockets in q, so you need to create a socket in C and then bind that to q. Once you have a socket, you can then serialize the data using .protobufkdb.serializeArray, with the data, to get a byte buffer. That byte buffer can then be sent on the UDP socket either as uni or multicast.

Many Thanks

Luke