How to send data to port that opened in XProtect from EventServer plugin using SDK?

We have a some system, integrated with XProtect Corporate by GenericEvents.

On the side of our system we created some message and sended to port (that bind to GenericEvent)

On the XProtect side (in plugin for EventServer)

messages are handled by EnvironmentManager.Instance.RegisterReceiver.

For get message from XProtect in our system created socket, connected to another port (that binded to another GenericEvent) and async receive data.

We trying a send data by TriggerCommand (EnvironmentManager.Instance.SendMessage(new VideoOS.Platform.Messaging.Message(MessageId.Control.TriggerCommand, Encoding.UTF8.GetBytes(“HelloMilestone” + Environment.NewLine)), someGenericFQID)), but unsuccessfully.

How to send data to port that opened in XProtect from EventServer plugin using SDK?

It possible without using .Net Sockets?

Please consult the SDK Documentation and check the following two Protocol Integration samples:

  • “Trigger Generic Event”
  • “Trigger Generic Event Stream”

Does this give you sufficient hints?

Thank you for your response Torsten, but we do not have a problem getting data from a socket, we have a problem sending data to GenericEvent from milestone plugin without using .Net Sockets. We need a way for sending data using Milestone SDK

Do I understand this correcty: You do already receive generic events from your software. But now you also want to sent from an Event Server plugin to your software?

Yes , that’s right

OK. But I do not understand why you want to send it without using .NET sockets and use .NET instead? Eventually, the SDK only uses some library functions to send stuff, so why do you consider this a better option?

So you suggest to open a port on our system and send data from plugin to it?

The problem is that we have a several these systems, and we can not afford to use a direct connection on a socket.

Now “EventServer” used as a central event exchange hub.

Do I understand correctly that the “GenericEvent” can only be external incoming event?

Yes. Generic Event is only for events coming into XProtect, there is no similar functionality outgoing.