public WebsocketTopicClient(Uri uri, DelegateConnected connected, CompletionQueue completion_queue) { message_client = new WebsocketMessageClient( uri, WebsocketTopicServer.protocol, connected, MessageWaiting, completion_queue); topic_client = new TopicClient(message_client); this.completion_queue = completion_queue; }
public TcpTopicClientSAE(IPEndPoint ipEndPoint, DelegateConnected connected, CompletionQueue completion_queue) { message_client = new TcpMessageClientSAE( ipEndPoint, connected, MessageWaiting, completion_queue); topic_client = new TopicClient(message_client); this.completion_queue = completion_queue; }
public TcpConnectSAE(Socket socket, IPEndPoint remote, DelegateConnected connected) { if (null == socket) throw new ArgumentException(); this.socket = socket; if (null == remote) throw new ArgumentException(); if (null == connected) throw new ArgumentException(); this.connected = connected; SocketAsyncEventArgs sae = new SocketAsyncEventArgs(); sae.Completed += sae_Completed; sae.RemoteEndPoint = remote; socket.ConnectAsync(sae); }
public void Connect(IPEndPoint ipEndPoint, DelegateConnected connected_callback) { if (connected) throw new ArgumentException("Connect already called"); else { connected = true; client = new TcpTopicClientIAR( ipEndPoint, connected_callback, completion_queue); ThreadPool.QueueUserWorkItem(FlushProc); } }
public TcpMessageClientIAR(IPEndPoint server, DelegateConnected connected_callback, DelegateMessageWaiting message_callback, CompletionQueue completion_queue) { send_queue = new SendQueue(completion_queue, new TcpSendIAR(client, completion_queue)); if (null == server) throw new ArgumentException(); this.server = server; if (null == connected_callback) throw new ArgumentException(); this.OnConnected = connected_callback; if (null == message_callback) throw new ArgumentException(); this.OnMessageWaiting = message_callback; if (null == message_callback) throw new ArgumentException(); this.completion_queue = completion_queue; new TcpConnectIAR(client, server, ConnectedThread); }
public TcpMessageClient(IPEndPoint server, DelegateConnected connected_callback, DelegateMessageWaiting message_callback, CompletionQueue completion_queue, DelegateFactoryTcpReader factoryTcpReader) { send_queue = new SendQueue(completion_queue, new TcpSendIAR(client, completion_queue)); if (null == server) throw new ArgumentException(); this.server = server; if (null == connected_callback) throw new ArgumentException(); this.OnConnected = connected_callback; if (null == message_callback) throw new ArgumentException(); this.OnMessageWaiting = message_callback; if (null == message_callback) throw new ArgumentException(); this.completion_queue = completion_queue; if (null == factoryTcpReader) throw new ArgumentException(); this.factoryTcpReader = factoryTcpReader; SocketAsyncEventArgs connectAsyncEventArgs = new SocketAsyncEventArgs(); connectAsyncEventArgs.RemoteEndPoint = server; connectAsyncEventArgs.Completed += connectAsyncEventArgs_Completed; client.ConnectAsync(connectAsyncEventArgs); }