Skip to content

Commit dafcc61

Browse files
authored
Fix
1 parent c64e7a7 commit dafcc61

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

articles/azure-web-pubsub/socketio-serverless-function-binding.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@ Function triggers for socket connect event.
358358

359359
```python
360360
import azure.functions as func
361+
from azure.functions.decorators.core import DataType
361362
import json
362363
app = func.FunctionApp()
363364

@@ -370,6 +371,7 @@ Function triggers for socket connected event.
370371

371372
```python
372373
import azure.functions as func
374+
from azure.functions.decorators.core import DataType
373375
import json
374376
app = func.FunctionApp()
375377

@@ -382,6 +384,7 @@ Function triggers for socket disconnected event.
382384

383385
```python
384386
import azure.functions as func
387+
from azure.functions.decorators.core import DataType
385388
import json
386389
app = func.FunctionApp()
387390

@@ -394,6 +397,7 @@ Function triggers for normal messages from clients.
394397

395398
```python
396399
import azure.functions as func
400+
from azure.functions.decorators.core import DataType
397401
import json
398402
app = func.FunctionApp()
399403

@@ -406,6 +410,7 @@ Function trigger for normal messages with callback.
406410

407411
```python
408412
import azure.functions as func
413+
from azure.functions.decorators.core import DataType
409414
import json
410415
app = func.FunctionApp()
411416

@@ -414,17 +419,19 @@ def chat(sio: str) -> str:
414419
return json.dumps({'ack': ["param1"]})
415420
```
416421

417-
### Configuration
422+
### Annotation
423+
418424

419425
| Property | Description |
420426
|---------|---------|
421427
| arg_name | The variable name of the argument in function to represent the trigger binding. |
422428
| type | Must be `socketiotrigger` |
423429
| hub | The hub name that a client needs to connect to. |
424-
| data_type | Must be `DataType.STRING. |
430+
| data_type | Must be `DataType.STRING` |
425431
| namespace | The namespace of the socket. Default: "/" |
426432
| eventName | The event name that the function triggers for. Some event names are predefined: `connect` for socket connect event. `connected` for socket connected event. `disconnected` for socket disconnected event. And other events are defined by user and it need to match the event name sent by client side. |
427433

434+
428435
---
429436

430437
### Request of Input Binding

0 commit comments

Comments
 (0)