Constructor Summary
Public Constructor | ||
public |
constructor(socket: RTCSocket, engine: RTCEngine) 주의: 이 생성자는 RTCEngine 내부에서만 호출되어야 합니다. |
Method Summary
Public Methods | ||
public |
async receiveTransaction(label: string) this method was deprecated.
상대가 파일을 보내기 위해 트렌젝션을 만들었을때 파일을 받기 위한 트렌젝션을 생성하고 |
|
public |
async send(data: *): Promise<Transaction|void> this method was deprecated.
채널을 통해서 데이터를 전송합니다. |
Inherited Summary
From class Mitt | ||
public |
이벤트별 이벤트 핸들러들 |
|
public |
addEventListener(type: string | symbol, handler: EventHandler<any>): *
|
|
public |
Invoke all handlers for the given type. |
|
public |
Remove an event handler for the given type. |
|
public |
on(type: string | symbol, handler: EventHandler<any>): * Register an event handler for the given type. |
|
public |
once(type: *, handler: *) |
|
public |
removeEventListener(type: string | symbol, handler: EventHandler<any>): *
|
Public Constructors
public constructor(socket: RTCSocket, engine: RTCEngine) source
주의: 이 생성자는 RTCEngine 내부에서만 호출되어야 합니다.
Override:
Mitt#constructorParams:
Name | Type | Attribute | Description |
socket | RTCSocket | 데이터 전송에 사용할 RTCSocket |
|
engine | RTCEngine | 이 채널을 생성한 엔진 |
Public Methods
public async receiveTransaction(label: string) source
상대가 파일을 보내기 위해 트렌젝션을 만들었을때 파일을 받기 위한 트렌젝션을 생성하고 transaction
이벤트로 알립니다.
Params:
Name | Type | Attribute | Description |
label | string | 트렌젝션의 식별자 |
public async send(data: *): Promise<Transaction|void> source
채널을 통해서 데이터를 전송합니다. File
데이터를 받으면 새로운 트렌젝션을 만들고 그걸 통해 파일의 데이터를 전송합니다.
받는쪽에서는 transaction
이벤트를 통해 파일을 받을 수 있습니다.
Params:
Name | Type | Attribute | Description |
data | * | 전송할 데이터. |