TcpServerChannel.StartListening(Object) Método

Definição

Instrui o canal atual a iniciar a escuta em um canal depois que o método StopListening(Object) é chamado para interromper a escuta no canal.Instructs the current channel to start listening on a channel after the StopListening(Object) method has been called to stop listening on the channel.

public:
 virtual void StartListening(System::Object ^ data);
public void StartListening (object data);
abstract member StartListening : obj -> unit
override this.StartListening : obj -> unit
Public Sub StartListening (data As Object)

Parâmetros

data
Object

Informações de inicialização opcionais.Optional initialization information.

Implementações

Comentários

O TcpServerChannel construtor chama automaticamente StartListening , portanto, você não deve chamar esse método, a menos que StopListening tenha sido chamado anteriormente.The TcpServerChannel constructor automatically calls StartListening, so you shouldn't call this method unless StopListening was previously called.

Chamar StartListening em um canal já escutando pode levar a comportamentos inesperados e deve ser evitado.Calling StartListening on an already listening channel may lead to unexpected behaviors and should be avoided.

Se o canal usar um número de porta atribuído dinamicamente, o número da porta poderá ser alterado quando você reiniciar a escuta.If your channel uses a dynamically assigned port number, your port number might change when you restart listening.

O objeto de dados pode ser usado para passar um estado de inicialização específico para o canal.The data object can be used to pass a specific initialization state to the channel. Se você não quiser passar um estado específico para o canal, defina data como null .If you do not want to pass a specific state to the channel, set data to null.

Aplica-se a