﻿---
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 | &#x2714; | Available port number for the server |
  | Start | - | Boolean | &#x2716; | True > immediately starts the created server |

  
  Returns:  Arbitrary - Returns a running TCP server object on successful creation or a structure with an error description

<br/>


:::caution
**NOCLI:** this method is not available in CLI version
:::
<br/>



```bsl title="1C:Enterprise/OneScript code example"

```
 




