--- sidebar_position: 1 --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; # Create server Creates a new TCP server and sets the port `Function CreateServer(Val Port, Start = False) Export` | Parameter | CLI option | Type | Required | Description | |-|-|-|-|-| | Port | - | Number | ✔ | Available port number for the server | | Start | - | Boolean | ✖ | True > immediately starts the created server | Returns: Arbitrary - Returns a running TCP server object on successful creation or a structure with an error description
:::caution **NOCLI:** this method is not available in CLI version :::
```bsl title="1C:Enterprise/OneScript code example" ```