Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

Camera communicates with SignalR connection

$
0
0

Hello

I have a client with over 800 IP cameras - the kind that count people & vehicles entering and leaving a zone.

these camera can initiate contact with a service via a socket mechanism.

I was hoping that SignalR could be the platform to do this, I am not sure yet it I will self-host or use IIS & WebAPI yet. I'm sure the code is not so different in that respect.

the camera opens communication with something like this

43

action=hello&mac=<macaddress>&type=nvc&etc..

the "43" is the length of the text begin sent in the request

And then I am expected to respond with a command to the camera eg:

45

action=update&<parms>

The camera will respond with

2

OK

and I can do as many of these as I like.

when I am done I do

4

DONE

and that ends the communication.

My main purpose with the camera is to have it send hourly counts of the people for live updates to my client

So What I am going to get is (hopfully) is a HTML table of data. which I then parse out using existing code which I already have.

I've got a basic scaffold of code using persistent connection and a console app which I use to mock the camera.

I can get a connection between the two and the client can send a string to the server, But haven't figured out how the server sends data back to the client. And then also how I can have a "conversation" going between the two. Including sending these message length numbers. 

Most examples I've seen are some kind of chat programme which broadcasts the changes/text to every client connected. definitly not what I need - I need a conversation only between server and camera. For each of 800 cameras that will connect every hour to send an update.

Hoping someone has some tips out there.

Thanks

Salik


Oracle, SQL Server databases designed and built


Viewing all articles
Browse latest Browse all 8156

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>