---
title: roStreamConnectResultEvent
slug: develop/rostreamconnectresultevent
docTags: 
createdAt: 2025-03-26T17:24:28.760Z
---

This event is sent to a message port associated with an roTCPStream object when an `AsyncConnectTo()` request has been completed or has failed.

## ifInt

**GetInt() As Integer**

Returns the result code of the event. If the connection was successfully established, then this method will return 0. If connection failed for any reason, this method will return a non-zero integer.

**SetInt(value As Integer) As Void**

Sets the value of the event. 

## ifUserData

**SetUserData(user\_data As Object) As Void**

Sets the user data.

**GetUserData() As Object**

Returns the user data that has previously been set via `SetUserData()` (on either the event or source object). It will return `Invalid` if no data has been set.

 

 

