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

Ability to dependency inject network layer. #54

Open
ben-crowhurst opened this issue Dec 29, 2015 · 3 comments
Open

Ability to dependency inject network layer. #54

ben-crowhurst opened this issue Dec 29, 2015 · 3 comments
Assignees
Labels
Milestone

Comments

@ben-crowhurst
Copy link
Member

Move all ASIO logic into the socket abstraction.

@ben-crowhurst
Copy link
Member Author

Socket( void );
Socket::listen( port, bind_address, new_connection_callback );
Socket::connect( port, address, success_callback, error_callback );
Socket::write( ..., success_callback, error_callback );
Socket::read( ..., success_callback, error_callback );
Socket::set_option( name, value );
Socket::shutdown( void );
Socket::is_open( void );
Socket::is_closed( void );
static Socket::create( void );
Service::set_network_layer( TCPSocketFactory );
Service::set_network_layer( RS232SocketFactory );
etc...

@ben-crowhurst ben-crowhurst added this to the 4.5 milestone Feb 10, 2016
@ben-crowhurst ben-crowhurst changed the title Move network logic into Socket abstraction. Ability to dependency inject network layers Mar 3, 2016
@ben-crowhurst ben-crowhurst changed the title Ability to dependency inject network layers Ability to dependency inject network layer. Mar 3, 2016
@ben-crowhurst
Copy link
Member Author

ben-crowhurst commented Jun 16, 2016

During this development please remove the io_service and buffer from the request. The Socket should contain all of the ASIO related items.

Given we would have to place all runloop operations in the socket layer after this refactor. Might we want to give it a better name?

Socket::schedule( work );

Maybe:

Runloop runloop;
runloop.schedule( work );

@ben-crowhurst
Copy link
Member Author

ben-crowhurst commented Nov 3, 2016

This ticket is rising in priority. With this feature in place we could achieve a far greater set of tests to aid in the validation of the framework logic e.g. confirming WebSocketManager::parse/compose.

@ben-crowhurst ben-crowhurst modified the milestone: 4.5 Nov 4, 2016
@ben-crowhurst ben-crowhurst modified the milestone: 5.0 Dec 14, 2016
@ben-crowhurst ben-crowhurst modified the milestones: 5.0, 4.6 Apr 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant