Publish creates a new ComposedMsg and sends it back to the return identities over the IOPub channel.
(msgType string, content interface{})
| 184 | // Publish creates a new ComposedMsg and sends it back to the return identities over the |
| 185 | // IOPub channel. |
| 186 | func (receipt *msgReceipt) Publish(msgType string, content interface{}) error { |
| 187 | msg, err := NewMsg(msgType, receipt.Msg) |
| 188 | |
| 189 | if err != nil { |
| 190 | return err |
| 191 | } |
| 192 | |
| 193 | msg.Content = content |
| 194 | return receipt.Sockets.IOPubSocket.RunWithSocket(func(iopub zmq4.Socket) error { |
| 195 | return receipt.SendResponse(iopub, msg) |
| 196 | }) |
| 197 | } |
| 198 | |
| 199 | // Reply creates a new ComposedMsg and sends it back to the return identities over the |
| 200 | // Shell channel. |
no test coverage detected