uvic-aero / onboard-computer

0 stars 1 forks source link

Create Connections Data Structure for Video Server #25

Closed dragonprevost closed 4 years ago

dragonprevost commented 5 years ago

When serving frames from the OBC picamera, we may have multiple clients that are trying to acquire these frames. In order to accomodate this the VideoServer application has to have a data structure that holds the information for each client so it it can iterate through each client when sending frames

Psuedo Code

# New Connections
data, address = sock.recvfrom(4)
data = data.decode('utf-8')
    if(data == "get"):
        connections.append(address)
# Sending Frames
for client in connections:
    sock.sendto(frame_buffer, client)

Notes:

noahwc commented 4 years ago

I've begun work on this in the connections branch. The basic data structure is there. Next task is to listen for incoming heartbeats from clients.