-
Notifications
You must be signed in to change notification settings - Fork 2
nim.pass_through_proxy.NIMPassThroughProxy
nim/pass_through_proxy.NIMPassThroughProxy
-
EventEmitter
<NIMPassThroughProxyEvents
>↳
NIMPassThroughProxy
- eventNames
- listeners
- listenerCount
- emit
- on
- addListener
- once
- removeListener
- off
- removeAllListeners
- initEventHandlers
- sendHttpRequest
▸ eventNames(): "receiveHttpMsg"
[]
Return an array listing the events for which the emitter has registered listeners.
"receiveHttpMsg"
[]
EventEmitter.eventNames
node_modules/eventemitter3/index.d.ts:15
▸ listeners<T
>(event
): (...args
: ArgumentMap
<NIMPassThroughProxyEvents
>[Extract
<T
, "receiveHttpMsg"
>]) => void
[]
Return the listeners registered for a given event.
Name | Type |
---|---|
T |
extends "receiveHttpMsg"
|
Name | Type |
---|---|
event |
T |
(...args
: ArgumentMap
<NIMPassThroughProxyEvents
>[Extract
<T
, "receiveHttpMsg"
>]) => void
[]
EventEmitter.listeners
node_modules/eventemitter3/index.d.ts:20
▸ listenerCount(event
): number
Return the number of listeners listening to a given event.
Name | Type |
---|---|
event |
"receiveHttpMsg" |
number
EventEmitter.listenerCount
node_modules/eventemitter3/index.d.ts:27
▸ emit<T
>(event
, ...args
): boolean
Calls each of the listeners registered for a given event.
Name | Type |
---|---|
T |
extends "receiveHttpMsg"
|
Name | Type |
---|---|
event |
T |
...args |
ArgumentMap <NIMPassThroughProxyEvents >[Extract <T , "receiveHttpMsg" >] |
boolean
EventEmitter.emit
node_modules/eventemitter3/index.d.ts:32
▸ on<T
>(event
, fn
, context?
): NIMPassThroughProxy
Add a listener for a given event.
Name | Type |
---|---|
T |
extends "receiveHttpMsg"
|
Name | Type |
---|---|
event |
T |
fn |
(...args : ArgumentMap <NIMPassThroughProxyEvents >[Extract <T , "receiveHttpMsg" >]) => void
|
context? |
any |
EventEmitter.on
node_modules/eventemitter3/index.d.ts:40
▸ addListener<T
>(event
, fn
, context?
): NIMPassThroughProxy
Name | Type |
---|---|
T |
extends "receiveHttpMsg"
|
Name | Type |
---|---|
event |
T |
fn |
(...args : ArgumentMap <NIMPassThroughProxyEvents >[Extract <T , "receiveHttpMsg" >]) => void
|
context? |
any |
EventEmitter.addListener
node_modules/eventemitter3/index.d.ts:45
▸ once<T
>(event
, fn
, context?
): NIMPassThroughProxy
Add a one-time listener for a given event.
Name | Type |
---|---|
T |
extends "receiveHttpMsg"
|
Name | Type |
---|---|
event |
T |
fn |
(...args : ArgumentMap <NIMPassThroughProxyEvents >[Extract <T , "receiveHttpMsg" >]) => void
|
context? |
any |
EventEmitter.once
node_modules/eventemitter3/index.d.ts:54
▸ removeListener<T
>(event
, fn?
, context?
, once?
): NIMPassThroughProxy
Remove the listeners of a given event.
Name | Type |
---|---|
T |
extends "receiveHttpMsg"
|
Name | Type |
---|---|
event |
T |
fn? |
(...args : ArgumentMap <NIMPassThroughProxyEvents >[Extract <T , "receiveHttpMsg" >]) => void
|
context? |
any |
once? |
boolean |
EventEmitter.removeListener
node_modules/eventemitter3/index.d.ts:63
▸ off<T
>(event
, fn?
, context?
, once?
): NIMPassThroughProxy
Name | Type |
---|---|
T |
extends "receiveHttpMsg"
|
Name | Type |
---|---|
event |
T |
fn? |
(...args : ArgumentMap <NIMPassThroughProxyEvents >[Extract <T , "receiveHttpMsg" >]) => void
|
context? |
any |
once? |
boolean |
EventEmitter.off
node_modules/eventemitter3/index.d.ts:69
▸ removeAllListeners(event?
): NIMPassThroughProxy
Remove all listeners, or those of the specified event.
Name | Type |
---|---|
event? |
"receiveHttpMsg" |
EventEmitter.removeAllListeners
node_modules/eventemitter3/index.d.ts:79
▸ initEventHandlers(): void
注册全局回调
void
ts/nim/pass_through_proxy.ts:19
▸ sendHttpRequest(host
, path
, method
, headers
, body
, jsonExtension
, cb
): Promise
<[NIMResCode
, string
, string
, string
]>
发送一个透传 HTTP 请求
Name | Type | Description |
---|---|---|
host |
string |
要发送的 HTTP 请求 Host 地址 |
path |
string |
URL 中除了 Host 的 Path |
method |
NIMSendHttpRequestMethods |
要发送的 HTTP 请求方式 |
headers |
string |
- |
body |
string |
要发送的 HTTP 请求 Body 内容 |
jsonExtension |
string |
拓展字段,暂时无用 |
cb |
null | SendHttpRequestCallback
|
发送请求后的数据回调函数 |
Promise
<[NIMResCode
, string
, string
, string
]>
void 无返回值
ts/nim/pass_through_proxy.ts:33
• proxy: NIMPassThroughProxyAPI
ts/nim/pass_through_proxy.ts:12
• new NIMPassThroughProxy()
EventEmitter<NIMPassThroughProxyEvents>.constructor
ts/nim/pass_through_proxy.ts:13
- chatroom/chatroom
- chatroom_def/chatroom_def
- nim/client
- nim/data_sync
- nim/friend
- nim/global
- nim/msglog
- nim/nos
- nim/online_session
- nim/pass_through_proxy
- nim/plugin
- nim/session
- nim/subscribe_event
- nim/super_team
- nim/sysmsg
- nim/talk
- nim/talkex
- nim/team
- nim/tool
- nim/user
- nim_def/client_def
- nim_def/data_sync_def
- nim_def/doc_trans_def
- nim_def/friend_def
- nim_def/global_def
- nim_def/msglog_def
- nim_def/nos_def
- nim_def/online_session_def
- nim_def/pass_through_proxy_def
- nim_def/plugin_def
- nim_def/session_def
- nim_def/subscribe_event_def
- nim_def/super_team_def
- nim_def/sysmsg_def
- nim_def/talk_def
- nim_def/talkex_def
- nim_def/team_def
- nim_def/tool_def
- nim_def/user_def
- node-nim
- qchat/attachment
- qchat/channel
- qchat/channel_category
- qchat/instance
- qchat/message
- qchat/role
- qchat/server
- qchat/system_notification
- qchat_def/attachment_def
- qchat_def/channel_def
- qchat_def/instance_def
- qchat_def/message_def
- qchat_def/public_def
- qchat_def/role_def
- qchat_def/server_def
- qchat_def/system_notification_def