Inheritance: AService
示例#1
0
 /// <summary>
 /// accept
 /// </summary>
 public UChannel(USocket socket, UService service) : base(service, ChannelType.Accept)
 {
     this.socket             = socket;
     this.service            = service;
     this.RemoteAddress      = socket.RemoteAddress;
     this.socket.Received   += this.OnRecv;
     this.socket.Disconnect += () => { this.OnError(this, SocketError.SocketError); };
 }
示例#2
0
		/// <summary>
		/// accept
		/// </summary>
		public UChannel(USocket socket, UService service) : base(service, ChannelType.Accept)
		{
			this.socket = socket;
			this.service = service;
			this.RemoteAddress = socket.RemoteAddress;
			this.socket.Received += this.OnRecv;
			this.socket.Disconnect += () => { this.OnError(this, SocketError.SocketError); };
		}
示例#3
0
 /// <summary>
 /// connect
 /// </summary>
 public UChannel(USocket socket, string host, int port, UService service) : base(service, ChannelType.Connect)
 {
     this.socket        = socket;
     this.service       = service;
     this.RemoteAddress = host + ":" + port;
     this.socket.ConnectAsync(host, (ushort)port);
     this.socket.Received   += this.OnRecv;
     this.socket.Disconnect += () => { this.OnError(this, SocketError.SocketError); };
 }
示例#4
0
		/// <summary>
		/// connect
		/// </summary>
		public UChannel(USocket socket, string host, int port, UService service): base(service, ChannelType.Connect)
		{
			this.socket = socket;
			this.service = service;
			this.RemoteAddress = host + ":" + port;
			this.socket.ConnectAsync(host, (ushort)port);
			this.socket.Received += this.OnRecv;
			this.socket.Disconnect += () => { this.OnError(this, SocketError.SocketError); };
		}
示例#5
0
 public UChannel(USocket socket, string host, int port, UService service) : base(service)
 {
     this.socket        = socket;
     this.service       = service;
     this.remoteAddress = host + ":" + port;
 }