Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

the equivalent of python socket.send() in kdb

We are using symphony in our company and I am trying to send a message to the alert bot in symphony.

Someone sent me a small python script which does this already which uses the socket library.

They send the message as socket.send(msg) using import socket in their script.

Question is : what is socket.send comparable with in kdb ? It's not a http post so it's not the .Q.hp .. Is this similar -> {h:hopen hsym`$"host:port";h"someMessageCompatibleWithSymbphonyBot";hclose h}

UPDATE: I have been told that my kdb message is not pure tcp. Can anyone point me in the right direction?

like image 594
user06931912 Avatar asked Mar 27 '26 01:03

user06931912


1 Answers

hopen works for kdb-to-kdb, not kdb-to-other so yes in that sense it's not pure tcp.

Normally when kdb needs to communicate with another system by tcp you would use some sort of middleman library to handle the communication layer.

In theory you could use the python script/package in your kdb instance if you use one of the numerous kdb<>python interfaces (pyq, embedpy, qpython etc)

like image 127
terrylynch Avatar answered Mar 29 '26 15:03

terrylynch



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!