---
name: "offSocketMessageReceived"
mode: "kit"
versionRequirements:
  - { name: "DeviceKit", version: "1.2.7" }
  - { name: "@ray-js/ray", version: "0.6.23" }
platform:
  - "iOS"
  - "Android"
async: true
---

## offSocketMessageReceived

> [VERSION] DeviceKit >= 1.2.7 | @ray-js/ray >= 0.6.23

> [PLATFORM] iOS, Android

> ⚡ **Supports Promise** — Returns a Promise when success / fail / complete callbacks are omitted.

### Method signature

```typescript
offSocketMessageReceived(listener: Function)
```

### Description

Socket message channel report

### Parameters

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `listener` | `(params: SocketResponse) => void` | Yes | - |  |

### Referenced Types

##### `interface` SocketResponse

| Property | Type | Required | Since | Description |
| --- | --- | --- | --- | --- |
| `message` | `Record<string, Record<string, any>>` | Yes | `1.2.6` | Message content |
| `deviceId` | `string` | Yes | `1.2.6` | Device ID |
| `type` | `number` | Yes | `1.2.6` | LAN message type |


### Examples

```tsx
import { device } from '@ray-js/ray'

const listener = function (res) { console.log(res) }
device.onSocketMessageReceived(listener)
device.offSocketMessageReceived(listener)
```
