package
0.0.0-20210929061546-b3031ee533ac
Repository: https://github.com/techx/playground.git
Documentation: pkg.go.dev

# README

packet

This is where we keep all of the packets that can be sent in Playground! Our packets generally fall into two classes (and they can belong to both):

  • client: A packet sent by clients to the server
    • e.g. get_messages will be sent by a client who needs to load their private messages with someone else
  • server: A packet sent by the server to clients
    • e.g. messages will be returned to a client after they send a get_messages packet

One example of a packet that belongs to both classes is chat, which a client can send to the server in order to send a chat message to the room. The server will in turn send this same packet back to the other clients.

Adding a new client packet

  1. Create a struct for this packet (see existing files for examples). Make sure to implement PermissionCheck, MarshalBinary, and UnmarshalBinary.
    • PermissionCheck returns true when the sender has permission to send that packet
  2. Add the new packet to parse.go along with its identifier
  3. Write the handler for this packet in hub.go

Adding a new server packet

  1. Create a struct for this packet. Make sure to implement MarshalBinary and UnmarshalBinary
  2. Create an Init function with parameters that mirror what needs to be sent to the client
  3. Use the Init function to create a new packet, and pass it to h.Send to send it to clients

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

No description provided by the author
Urgent notification -- we will reach out through every method we have available.
Low-level/info notification -- we'll only display the notification pop-up in Hack Penguin.
Medium-level notification -- we'll also contact them through their preferred methods of notification.
No description provided by the author

# Structs

No description provided by the author
Sent by clients when they need to add a valid email to our system.
The base packet that can be sent between clients and server.
No description provided by the author
Sent by clients when they dance.
Sent by clients when they're adding an element.
Sent by clients when they're deleting an element.
Sent by clients when they're deleting an element.
Sent by clients when they're updating the room.
Sent by clients when they need a login code.
No description provided by the author
Sent when a user confirms attendance for an event.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Sent by clients when adding a hallway.
Sent by clients when they're deleting a hallway.
Sent by clients when they're updating a hallway.
Sent by server to clients upon connecting.
Sent by clients after receiving the init packet.
Sent by ingests when a user opens the jukebox for the first time.
Sent by ingests when a client disconnects.
No description provided by the author
No description provided by the author
No description provided by the author
Sent by clients when they move around.
No description provided by the author
Sent by ingests when a song is added to queue.
No description provided by the author
Sent by hackers to join a sponsor's queue.
Sent by hackers to take themselves off queue.
sent by hackers and sponsors to subscribe to queue updates.
sent by hackers and sponsors to unsubscribe to queue updates.
Sent by server to update a hacker on their position in the queue.
Sent by server to update a hacker on their position in the queue.
No description provided by the author
No description provided by the author
Sent by clients when they're adding an element.
Sent by clients when settings are changed.
Sent by ingests when a song is added to queue.
No description provided by the author
No description provided by the author
Sent by clients when the window gains or loses focus.
Sent by ingests when a client changes rooms.
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author