Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions example-telnet/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ impl ServerConnector for ServerContext {
optional_outbound: tokio::sync::mpsc::Sender<
<<Self::Bindings as ConnectionBindings>::Serializer as Serializer>::Message,
>,
_address: std::net::SocketAddr,
) -> <Self::Bindings as ConnectionBindings>::Reactor {
StringReactor {
outbound: optional_outbound,
Expand Down
4 changes: 3 additions & 1 deletion protosocket-server/src/connection_server.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use std::future::Future;
use std::io::Error;
use std::net::SocketAddr;
use std::pin::Pin;
use std::sync::Arc;
use std::task::Context;
Expand All @@ -21,6 +22,7 @@ pub trait ServerConnector: Unpin {
optional_outbound: mpsc::Sender<
<<Self::Bindings as ConnectionBindings>::Serializer as Serializer>::Message,
>,
address: SocketAddr,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine, but probably your use case is better served with the protosocket_rpc::server module. It already does this. (example)

) -> <Self::Bindings as ConnectionBindings>::Reactor;

fn maximum_message_length(&self) -> usize {
Expand Down Expand Up @@ -108,7 +110,7 @@ impl<Connector: ServerConnector> Future for ProtosocketServer<Connector> {
mpsc::channel(self.max_queued_outbound_messages);
let reactor = self
.connector
.new_reactor(outbound_submission_queue.clone());
.new_reactor(outbound_submission_queue.clone(), address);
let stream = self.connector.connect(stream);
let connection: Connection<Connector::Bindings> = Connection::new(
stream,
Expand Down
Loading