RelayBindJS is a conn.Bind implementation for WebAssembly environments. Do not limit to build only js, because we want to be able to run tests
| 15 | // RelayBindJS is a conn.Bind implementation for WebAssembly environments. |
| 16 | // Do not limit to build only js, because we want to be able to run tests |
| 17 | type RelayBindJS struct { |
| 18 | *conn.StdNetBind |
| 19 | |
| 20 | recvChan chan recvMessage |
| 21 | endpoints map[netip.Addr]net.Conn |
| 22 | endpointsMu sync.Mutex |
| 23 | activityRecorder *ActivityRecorder |
| 24 | ctx context.Context |
| 25 | cancel context.CancelFunc |
| 26 | } |
| 27 | |
| 28 | func NewRelayBindJS() *RelayBindJS { |
| 29 | return &RelayBindJS{ |
nothing calls this directly
no outgoing calls
no test coverage detected