feat(mobile): переименование ios -> mobile, универсальный движок для iOS/Android
This commit is contained in:
1 parent
fb998547eb
commit
575f278a9a
21 files changed
+812
-500
No files matched your search
@@ -33,6 +33,7 @@ type Params struct {
|
||||
KCPProfile kcptun.Profile
|
||||
KCPFEC kcptun.FEC
|
||||
ClientID string
|
||||
TrafficStats *stats.Stats
|
||||
}
|
||||
|
||||
// BondHandler распределяет одно принятое TCP-соединение по всем активным сессиям пула.
|
||||
@@ -275,7 +276,11 @@ func createSmuxSession(ctx context.Context, deps *Deps, params *Params, peer *ne
|
||||
st := stats.New(deps.log().DebugEnabled())
|
||||
go st.LogEvery(statsCtx, deps.log().Debugf, fmt.Sprintf("[session %d] TCP", id), "to-turn", "from-turn")
|
||||
|
||||
kcpSess, err := kcptun.NewKCPOverDTLS(&stats.CountingConn{Conn: dtlsConn, Stats: st}, false, params.KCPProfile, params.KCPFEC)
|
||||
var countedConn net.Conn = dtlsConn
|
||||
if params.TrafficStats != nil {
|
||||
countedConn = &stats.CountingConn{Conn: countedConn, Stats: params.TrafficStats}
|
||||
}
|
||||
kcpSess, err := kcptun.NewKCPOverDTLS(&stats.CountingConn{Conn: countedConn, Stats: st}, false, params.KCPProfile, params.KCPFEC)
|
||||
if err != nil {
|
||||
cleanup()
|
||||
return nil, nil, fmt.Errorf("KCP session: %w", err)
|
||||
|
||||
Reference in new issue
Block a user