feat: functional legacy socket

This commit is contained in:
Adhiraj Singh
2021-12-17 20:58:33 +05:30
parent d8b415a075
commit c803e22e8a
15 changed files with 695 additions and 66 deletions

View File

@@ -1,14 +1,12 @@
import { LegacySocketConfig } from '../Types'
import { DEFAULT_LEGACY_CONNECTION_CONFIG } from '../Defaults'
import _makeConnection from './groups'
import _makeLegacySocket from './groups'
// export the last socket layer
const makeConnection = (config: Partial<LegacySocketConfig>) => (
_makeConnection({
const makeLegacySocket = (config: Partial<LegacySocketConfig>) => (
_makeLegacySocket({
...DEFAULT_LEGACY_CONNECTION_CONFIG,
...config
})
)
export type Connection = ReturnType<typeof makeConnection>
export default makeConnection
export default makeLegacySocket