MCPcopy Create free account

hub / github.com/cgrates/fsock / functions

Functions186 in github.com/cgrates/fsock

↓ 20 callersMethodWrite
(b []byte)
fsock_test.go:158
↓ 18 callersMethodClose
()
utils.go:22
↓ 13 callersFunctionsplitIgnoreGroups
splitIgnoreGroups splits a string by a separator, excluding elements enclosed in {}, [], or ().
utils.go:113
↓ 11 callersMethodErr
(string)
utils.go:26
↓ 10 callersMethodconnect
connect establishes a connection to FreeSWITCH using the provided configuration details. This method is not thread-safe and should be called with exte
fsock.go:90
↓ 10 callersFunctionheaderVal
headerVal extracts a header's value from a content string.
utils.go:158
↓ 7 callersFunctionMapChanData
MapChanData parses channel information from a given string coming from fsock into a slice of maps, where each map contains individual channel data.
utils.go:60
↓ 7 callersFunctiontoJSON
(v interface{})
utils_test.go:356
↓ 6 callersMethodreadHeaders
readHeaders reads and parses the headers from a FreeSWITCH response.
fsconn.go:100
↓ 5 callersMethodPopFSock
()
fsockpool.go:76
↓ 5 callersMethodRead
(b []byte)
fsock_test.go:154
↓ 5 callersMethodauth
auth authenticates the connection with FreeSWITCH using the provided password.
fsconn.go:135
↓ 5 callersMethodconnected
connected checks if socket connected. Not thread safe.
fsock.go:160
↓ 5 callersMethodfilterEvents
filterEvents will filter the Events coming from FreeSWITCH.
fsconn.go:152
↓ 5 callersMethodreconnectIfNeeded
reconnectIfNeeded if not connected, attempt reconnect if allowed
fsock.go:189
↓ 5 callersMethodsend
send will send the content over the connection.
fsconn.go:180
↓ 4 callersMethodSend
Send will send the content over the connection, exposing synchronous interface outside
fsconn.go:337
↓ 4 callersMethodeventsPlain
eventsPlain will subscribe for events in plain mode.
fsconn.go:188
↓ 4 callersMethodreadBody
readBody reads the specified number of bytes from the buffer. The number of bytes to read is given by 'noBytes', which is determined from the content-
fsconn.go:246
↓ 3 callersMethodConnected
Connected adds up locking on top of normal connected method.
fsock.go:153
↓ 3 callersMethodDisconnect
Disconnect adds up locking for disconnect
fsock.go:165
↓ 3 callersFunctionEventToMap
(event string)
utils.go:81
↓ 3 callersFunctionNewFSock
NewFSock connects to FS and starts buffering input.
fsock.go:26
↓ 3 callersMethodPushFSock
(fsk *FSock)
fsockpool.go:98
↓ 3 callersMethodSendCmd
Generic proxy for commands
fsock.go:207
↓ 3 callersMethodSendMsgCmdWithBody
SendMsgCmdWithBody command
fsock.go:232
↓ 3 callersMethoddisconnect
Disconnect disconnects from socket
fsock.go:172
↓ 3 callersMethoddoBackgroundJob
bgapi event lisen fuction
fsconn.go:315
↓ 3 callersFunctionfillBuffer
(buf *bytes.Buffer, content string)
fsock_test.go:964
↓ 3 callersFunctiongenUUID
helper function for uuid generation
utils.go:102
↓ 3 callersFunctionmockFreeSWITCH
mockFreeSWITCH acts as a FreeSWITCH server. It goes through auth and then executes fn. The fn parameter can be customized based on the needs of the te
fsock_test.go:997
↓ 3 callersMethodreadEvent
readEvent will read one Event from FreeSWITCH, made out of headers and body (if present).
fsconn.go:227
↓ 3 callersMethodreadEvents
readEvents continuously reads and processes events from the network buffer. It stops and exits the loop if an error is encountered, after sending it t
fsconn.go:259
↓ 3 callersFunctionurlDecode
urlDecode decodes URL-encoded FS event header values, reverting to the original on error.
utils.go:173
↓ 2 callersMethodConnect
Connect adds locking to connect method.
fsock.go:80
↓ 2 callersFunctionFSEventStrToMap
FSEventStrToMap transforms an FreeSWITCH event string into a map, optionally filtering headers.
utils.go:44
↓ 2 callersMethodInfo
(string)
utils.go:27
↓ 2 callersMethodLocalAddr
()
fsock.go:268
↓ 2 callersMethodReconnectIfNeeded
ReconnectIfNeeded adds up locking to reconnectIfNeeded
fsock.go:182
↓ 2 callersMethodSendBgapiCmd
Send BGAPI command
fsock.go:259
↓ 2 callersMethodSendCmdWithArgs
(cmd string, args map[string]string, body string)
fsock.go:216
↓ 2 callersMethodSendEventWithBody
SendEventWithBody command
fsock.go:246
↓ 2 callersMethodWarning
(string)
utils.go:29
↓ 2 callersMethoddispatchEvent
Dispatch events to handlers in async mode
fsconn.go:288
↓ 2 callersFunctiongetMapKeys
(m map[string][]func(string, int))
utils.go:180
↓ 2 callersMethodsignalError
signalError handles logging or sending the error to the stopError channel.
fsock.go:138
↓ 1 callersMethodAlert
(string)
utils.go:33
↓ 1 callersMethodClose
()
utils.go:34
↓ 1 callersMethodCrit
(string)
utils.go:35
↓ 1 callersMethodDebug
(string)
utils.go:36
↓ 1 callersMethodEmerg
(string)
utils.go:37
↓ 1 callersMethodErr
(string)
utils.go:38
↓ 1 callersMethodInfo
(string)
utils.go:39
↓ 1 callersFunctionNewFSConn
NewFSConn constructs and connects a FSConn
fsconn.go:27
↓ 1 callersFunctionNewFSockPool
Instantiates a new FSockPool
fsockpool.go:18
↓ 1 callersMethodNotice
(string)
utils.go:40
↓ 1 callersMethodSendApiCmd
Send API command
fsock.go:227
↓ 1 callersMethodSendEvent
SendEvent command
fsock.go:254
↓ 1 callersMethodSendMsgCmd
SendMsgCmd command
fsock.go:241
↓ 1 callersMethodWarning
(string)
utils.go:41
↓ 1 callersMethodhandleConnectionError
handleConnectionError listens for connection errors and decides whether to attempt a reconnection. It logs errors and manages the stopError channel si
fsock.go:111
MethodAlert
(string)
utils.go:21
MethodAlert
(string)
fsock_test.go:618
FunctionBenchmarkFSockReadBody
(b *testing.B)
fsock_test.go:969
FunctionBenchmarkHeaderVal
*********************** Benchmarks ************************/
utils_test.go:790
FunctionBenchmarkSplitIgnoreGroupsPreallocatedSlice
(b *testing.B)
utils_test.go:822
FunctionBenchmarkSplitIgnoreGroupsUnallocatedSlice
* $ go test -bench=. -run=^$ -benchtime=1s -count=5 -benchmem goos: linux goarch: amd64 pkg: github.com/cgrates/fsock cpu: Intel(R) Core(TM) i7-10510
utils_test.go:814
MethodClose
()
fsock_test.go:142
MethodClose
()
fsock_test.go:178
MethodClose
()
fsock_test.go:212
MethodClose
()
fsock_test.go:622
MethodCrit
(string)
utils.go:23
MethodCrit
(string)
fsock_test.go:626
MethodDebug
(string)
utils.go:24
MethodDebug
(string)
fsock_test.go:630
MethodDisconnect
Disconnect will disconnect the fsConn from FreeSWITCH
fsconn.go:392
MethodEmerg
(string)
utils.go:25
MethodEmerg
(string)
fsock_test.go:634
MethodErr
(s string)
fsock_test.go:638
MethodInfo
(string)
fsock_test.go:644
MethodLocalAddr
()
fsock_test.go:146
MethodLocalAddr
()
fsock_test.go:182
MethodLocalAddr
()
fsock_test.go:216
MethodLocalAddr
LocalAddr returns the local address of the connection
fsconn.go:397
MethodNotice
(string)
utils.go:28
MethodNotice
(string)
fsock_test.go:648
MethodRead
(b []byte)
fsock_test.go:190
MethodRead
(b []byte)
fsock_test.go:224
MethodRemoteAddr
()
fsock_test.go:150
MethodRemoteAddr
()
fsock_test.go:186
MethodRemoteAddr
()
fsock_test.go:220
MethodSendBgapiCmd
Send BGAPI command
fsconn.go:377
MethodSetDeadline
(t time.Time)
fsock_test.go:162
MethodSetDeadline
(t time.Time)
fsock_test.go:198
MethodSetDeadline
(t time.Time)
fsock_test.go:232
MethodSetReadDeadline
(t time.Time)
fsock_test.go:166
MethodSetReadDeadline
(t time.Time)
fsock_test.go:202
MethodSetReadDeadline
(t time.Time)
fsock_test.go:236
MethodSetWriteDeadline
(t time.Time)
fsock_test.go:170
MethodSetWriteDeadline
(t time.Time)
fsock_test.go:206
next →1–100 of 186, ranked by callers