Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WO-005: Polymorphic Packages #15

Open
3 tasks
tomasanchez opened this issue Mar 27, 2022 · 3 comments
Open
3 tasks

WO-005: Polymorphic Packages #15

tomasanchez opened this issue Mar 27, 2022 · 3 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@tomasanchez
Copy link
Owner

User Story

AS a Developer
I WANT to sent different objects using only a function.
FOR avoiding creating different conexion_enviar_<object_name> functions which will result in include errors and malicious code.

Acceptance criteria

Develop a function, which given a conexiont_t, a socket, any object and transformer, which maps the object to stream, sends data to the corresponding process.

  • no warnings
  • no compilation error
  • document methods
@tomasanchez tomasanchez added documentation Improvements or additions to documentation enhancement New feature or request labels Mar 27, 2022
@rnsavinelli
Copy link
Collaborator

Whenever communications take place, both sender and receiver need to know the format of the message..

@rnsavinelli
Copy link
Collaborator

We've already defined a standard package:

typedef struct Package
{
	// Operation Code
	opcode_t opcode;
	// Internal buffer
	buffer_t *buffer;
} package_t;

@rnsavinelli
Copy link
Collaborator

In that regard a enviar_stream would be the generic method... Once received, interpreting the stream should depend on the nature of the data..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants