---
title: "removeSocketListener(forPort:)"
framework: virtualization
role: symbol
role_heading: Instance Method
path: "virtualization/vzvirtiosocketdevice/removesocketlistener(forport:)"
---

# removeSocketListener(forPort:)

Removes the listener object from the specfied port.

## Declaration

```swift
func removeSocketListener(forPort port: UInt32)
```

## Parameters

- `port`: The port number to clear. If the specified port doesn’t have a listener object, this method does nothing.

## See Also

### Configuring Port Listeners

- [setSocketListener(_:forPort:)](virtualization/vzvirtiosocketdevice/setsocketlistener(_:forport:).md)
